????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.119.110.128 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/sysvmsg/tests/ |
Upload File : |
--TEST-- msg_set_queue() and msg_stat_queue() --SKIPIF-- <?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extension is not available")?> --FILE-- <?php $id = ftok(__FILE__, 'r'); $q = msg_get_queue($id); echo "Set mode:\n"; $arr = array('msg_perm.mode' => 0600); var_dump(msg_set_queue($q, $arr)); echo "Did really work:\n"; var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); echo "Set uid:\n"; // same as the running user to make it succeed $arr = array('msg_perm.uid' => getmyuid()); var_dump(msg_set_queue($q, $arr)); echo "Did really work:\n"; var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); echo "Set gid:\n"; // same as the running user to make it succeed $arr = array('msg_perm.gid' => getmygid()); var_dump(msg_set_queue($q, $arr)); echo "Did really work:\n"; var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); echo "Set smaller qbytes:\n"; $res = msg_stat_queue($q); $arr = array('msg_qbytes' => ($res['msg_qbytes'] -1)); var_dump(msg_set_queue($q, $arr)); echo "Did really work:\n"; var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); if (!msg_remove_queue($q)) { echo "BAD: queue removal failed\n"; } echo "Done\n"; ?> --EXPECTF-- Set mode: bool(true) Did really work: bool(true) Set uid: bool(true) Did really work: bool(true) Set gid: bool(true) Did really work: bool(true) Set smaller qbytes: bool(true) Did really work: bool(true) Done