PATH:
opt
/
cpanel
/
ea-php71
/
root
/
usr
/
share
/
tests
/
pecl
/
memcache
/
tests
<?php if (!extension_loaded("memcache")) { die("skip"); } error_reporting(E_ALL); /* * Please change host & port to match your configuration */ $host = "localhost"; $port = 11211; //$udpPort = 11211; $host2 = "localhost"; $port2 = 11212; //$udpPort2 = 11212; //ini_set('memcache.hash_strategy', 'standard'); //ini_set('memcache.hash_function', 'fnv'); //ini_set('memcache.protocol', 'binary'); if (ini_get('memcache.protocol') == 'binary') { $udpPort = 0; $udpPort2 = 0; } /* Start a server listening to a unix domain socket * * mkdir /var/run/memcached * chown memcached:memcached /var/run/memcached * memcached -d -u memcached -s /var/run/memcached/memcached.sock * chmod a+w /var/run/memcached/memcached.sock */ $domainsocket = 'unix:///var/run/memcached/memcached.sock'; // A server which is guaranteed to fail immediatly $nonExistingHost = "localhost"; $nonExistingPort = 11213; // A server which times out when attempting to connect to $unreachableHost = '10.254.254.254'; $unreachablePort = 11211; $udpPacketSize = 1400; $balanceKeys = array( 'consistent' => array( 'crc32' => array('key1_abc', 'key2_abcde'), 'fnv' => array('key1_a', 'key2_2534534'), ), 'standard' => array( 'crc32' => array('load_test_key1', 'load_test_key2'), 'fnv' => array('key1_ab', 'key2_a'), ), ); $strat = strtolower(ini_get('memcache.hash_strategy')); $func = strtolower(ini_get('memcache.hash_function')); list ($balanceKey1, $balanceKey2) = $balanceKeys[$strat][$func]; if (!isset($udpPort)) $udpPort = 0; if (!isset($udpPort2)) $udpPort2 = 0; $memcache = memcache_connect($host, $port); function test_connect1() { global $host, $port, $udpPort; $memcache = new MemcachePool(); $memcache->connect($host, $port, isset($udpPort) ? $udpPort : 0); return $memcache; } function test_connect2() { global $host2, $port2, $udpPort2; $memcache = new MemcachePool(); $memcache->connect($host2, $port2, isset($udpPort2) ? $udpPort2 : 0); return $memcache; } function test_connect_pool() { global $host, $port, $udpPort, $host2, $port2, $udpPort2; $memcache = new MemcachePool(); $memcache->addServer($host, $port, isset($udpPort) ? $udpPort : 0); $memcache->addServer($host2, $port2, isset($udpPort2) ? $udpPort2 : 0); return $memcache; } if (!$memcache) { die('skip Connection to memcached failed'); } ?>
[-] 027a.phpt
[edit]
[-] 022.phpt
[edit]
[-] 013.phpt
[edit]
[-] connect.inc
[edit]
[-] 039.phpt
[edit]
[-] 012.phpt
[edit]
[-] 100a.phpt
[edit]
[+]
..
[-] 003.phpt
[edit]
[-] 058.phpt
[edit]
[-] 048.phpt
[edit]
[-] 038.phpt
[edit]
[-] 019.phpt
[edit]
[-] 021.phpt
[edit]
[-] githubbug13.phpt
[edit]
[-] 100.phpt
[edit]
[-] 042.phpt
[edit]
[-] 008.phpt
[edit]
[-] memcache.sh
[edit]
[-] 025.phpt
[edit]
[-] 046.phpt
[edit]
[-] 043.phpt
[edit]
[-] pecl16536.phpt
[edit]
[-] 002.phpt
[edit]
[-] 019a.phpt
[edit]
[-] 055.phpt
[edit]
[-] 009.phpt
[edit]
[-] 015.phpt
[edit]
[-] 031.phpt
[edit]
[-] pecl17566.phpt
[edit]
[-] 010.phpt
[edit]
[-] 024a.phpt
[edit]
[-] pecl63142.phpt
[edit]
[-] 044.phpt
[edit]
[-] pecl11221.phpt
[edit]
[-] 027.phpt
[edit]
[-] 037.phpt
[edit]
[-] 053.phpt
[edit]
[-] 041.phpt
[edit]
[-] pecl17518.phpt
[edit]
[-] 007.phpt
[edit]
[-] 023.phpt
[edit]
[-] 033.phpt
[edit]
[-] 028.phpt
[edit]
[-] 032.phpt
[edit]
[-] 056.phpt
[edit]
[-] 100b.phpt
[edit]
[-] 029.phpt
[edit]
[-] 017.phpt
[edit]
[-] 052.phpt
[edit]
[-] 054.phpt
[edit]
[-] 040.phpt
[edit]
[-] 036b.phpt
[edit]
[-] bug73539.phpt
[edit]
[-] 057.phpt
[edit]
[-] pecl16442.phpt
[edit]
[-] 051.phpt
[edit]
[-] 014.phpt
[edit]
[-] 030.phpt
[edit]
[-] 004.phpt
[edit]
[-] 026.phpt
[edit]
[-] 005.phpt
[edit]
[-] 049.phpt
[edit]
[-] 022a.phpt
[edit]
[-] 036.phpt
[edit]
[-] 047.phpt
[edit]
[-] 035.phpt
[edit]
[-] 024.phpt
[edit]
[-] 034.phpt
[edit]
[-] 016.phpt
[edit]
[-] 011.phpt
[edit]
[-] 045.phpt
[edit]
[-] 001.phpt
[edit]
[-] 006.phpt
[edit]
[-] 020.phpt
[edit]
[-] 018.phpt
[edit]
[-] 050.phpt
[edit]