php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59529 session_start() not compatible with memcache session handler failover
Submitted: 2010-12-04 01:33 UTC Modified: 2010-12-05 22:04 UTC
From: mhaidar at squiz dot com dot au Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: 5.2.3 OS: lenny6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mhaidar at squiz dot com dot au
New email:
PHP Version: OS:

 

 [2010-12-04 01:33 UTC] mhaidar at squiz dot com dot au
Description:
------------
Description:
------------
memcache extension allows for failover (memcache.allow_failover = 1)
and can be used as a session handler (session.save_handler = memcache)

Unfortunately when failover happens a notice is thrown at session_start().

session_start() [function.session-start]: php_network_getaddresses: getaddrinfo failed: Name or service not known

Failover still works but the page is completely corrupted.
The manual is misleading: Quote 
"memcache.allow_failover boolean

    Whether to transparently failover to other servers on errors."

session_start does not deal with this so we can stay "transparent".


Expected result:
----------------
silent failover

Actual result:
--------------
php notice:
php_network_getaddresses: getaddrinfo failed: Name or service not known

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-04 01:37 UTC] mhaidar at squiz dot com dot au
Change to correct package
 [2010-12-04 11:42 UTC] tony at daylessday dot org
Use display_errors = Off if you won't want to see any warnings/errors (you can always redirect them into a log file).
 [2010-12-05 22:04 UTC] mhaidar at squiz dot com dot au
I can sure hide the errors but this still does not work as advertised..
 [2012-11-13 09:47 UTC] dennisbech at yahoo dot dk
I had the same problem after messing around with my /etc/hosts file. 
It was solved when I added back: 

127.0.0.1	localhost

which I had for some reasons removed. This made it difficult for memcache to use 
localhost properly - and therefor the error.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC