⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
local
/
src
/
memcache-8.0
/
tests
/
View File Name :
057.phpt
--TEST-- session locking --SKIPIF-- <?php include 'connect.inc'; if (!MEMCACHE_HAVE_SESSION) print 'skip not compiled with session support'; else if (!function_exists('pcntl_fork')) print 'skip not compiled with pcntl_fork() support'; ?> --FILE-- <?php include 'connect.inc'; $childcount = 50; $sid = md5(rand()); ini_set('session.save_handler', 'memcache'); ini_set('memcache.session_save_path', "tcp://$host:$port?udp_port=$udpPort;tcp://$host2:$host2?udp_port=$udpPort2;tcp://$nonExistingHost:$nonExistingPort"); ini_set('memcache.session_redundancy', 10); $pids = array(); for ($i = 0; $i < $childcount; $i++) { $pid = pcntl_fork(); if (!$pid) { // In child process session_id($sid); session_start(); if (!isset($_SESSION['counter'])) $_SESSION['counter'] = 0; $_SESSION['counter'] += 1; session_write_close(); exit(0); } else { // In parent process $pids[] = $pid; } } // Wait for children to exit foreach ($pids as $pid) { $status = 0; pcntl_waitpid($pid, $status); if ($status != 0) { //print "Child exited abnormally ($status)\n"; } } session_id($sid); session_start(); var_dump($_SESSION); ?> --EXPECT-- array(1) { ["counter"]=> int(50) }