����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.16.125.156
Web Server : LiteSpeed
System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : builderbox ( 1072)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cpanel/ea-php74/root/usr/share/tests/pecl/memcached/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php74/root/usr/share/tests/pecl/memcached/tests/session_lock.phpt
--TEST--
Session lock
--SKIPIF--
<?php 
include dirname(__FILE__) . "/skipif.inc"; 
if (!Memcached::HAVE_SESSION) print "skip";

if (PHP_VERSION_ID >= 70100) print "skip";
?>
--INI--
memcached.sess_locking       = true
memcached.sess_lock_wait_min = 500
memcached.sess_lock_wait_max = 1000
memcached.sess_lock_retries  = 3
memcached.sess_prefix        = "memc.test."

# Turn off binary protocol while the test matrix has older versions of
# libmemcached for which the extension warns of a broken touch command.
memcached.sess_binary_protocol = Off

session.save_handler = memcached

--FILE--
<?php

include dirname (__FILE__) . '/config.inc';

$m = new Memcached();
$m->addServer(MEMC_SERVER_HOST, MEMC_SERVER_PORT);

ob_start();
ini_set ('session.save_path', MEMC_SERVER_HOST . ':' . MEMC_SERVER_PORT);

session_start();
$session_id = session_id();

$_SESSION["test"] = "hello";
session_write_close();

session_start();
var_dump ($m->get ('memc.test.' . session_id()));
var_dump ($m->get ('memc.test.lock.' . session_id()));
session_write_close();
var_dump ($m->get ('memc.test.lock.' . session_id()));

// Test lock min / max
$m->set ('memc.test.lock.' . $session_id, '1');

$time_start = microtime(true);
session_start();
$time = microtime(true) - $time_start;

if (round ($time, 1) != 2.5) {
	echo "Waited longer than expected: $time" . PHP_EOL;
}
echo "OK";

--EXPECTF--
string(17) "test|s:5:"hello";"
string(1) "1"
bool(false)

Warning: session_start(): Unable to clear session lock record in %s on line %d
OK

Youez - 2016 - github.com/yon3zu
LinuXploit