From:
Operating system: FreeBSD 8.1-RELEASE
PHP version: 5.3.8
Package: memcache
Bug Type: Bug
Bug description:Session failover not functioning
Description:
------------
I have tried this eight ways to Sunday. I have created working test cases
on multiple servers with different combinations of settings to try and
figure out why the failover does not work.
We have php5.3.8, pecl-memcache-3.0.6, memcached-1.4.7 with repcached.
Upon session_start() a key is successfully created in memcache. Repcached
does replicate it over to the other server and can be verified by telnet.
When we simulate a failure, the session handler does not fail over to the
next available server listed in the save_path.
Current configuration:
session.save_handler = memcache
session.save_path = "tcp://ip1:11211, tcp://ip2:11211"
memcache.allow_failover="1"
memcache.hash_strategy="consistent"
We have tried to get it work with and without the below ini settings in
different combinations:
memcache.session_redundancy=2
memcache.redundancy=1
Test script:
---------------
<?php
session_start();
if(!isset($_SESSION['id'])) {
echo "VAR NOT SET!\n<br>";
$_SESSION['id']=rand();
}else {
echo $_SESSION['id']."\n<br>";
}
?>
--
Edit bug report at https://bugs.php.net/bug.php?id=60105&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60105&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60105&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=60105&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60105&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=60105&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60105&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=60105&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=60105&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=60105&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=60105&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=60105&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=60105&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=60105&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60105&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=60105&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60105&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=60105&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=60105&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=60105&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=60105&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=60105&r=mysqlcfg