ZF-6405: Memcache->addServer causes fatal error on windows
Description
When using the Windows Memcached port (http://code.jellycan.com/memcached/ or http://allegiance.chi-town.com/MemCacheDManager.as…) Zend_Cache causes a fatal error:
Fatal error: Call to undefined method Memcache::addServer() in ...\Zend\Cache\Backend\Memcached.php on line 135
When I change the addServer call to
$this->_memcache->connect($server['host'], $server['port']);
Memcache works as expected.
Maybe ZF should provide an alternate implementation for use of Memcache < v2.0?
Testing on Win Vista using php5.2.9 and memcached 1.2.6
Comments
Posted by Boyd Pappot (boyd) on 2009-04-24T00:02:42.000+0000
Problem solved using the Win32 extension from http://downloads.php.net/pierre/
Posted by Fabien MARTY (fab) on 2009-04-24T12:24:57.000+0000
You have to set a backend option "compatibility" => true to do that
Posted by Boyd Pappot (boyd) on 2009-04-24T22:34:24.000+0000
The weird thing is my problem was solved using the alternate php_memcached.dll from http://downloads.php.net/pierre/…
I'm still using the same version of memcached (1.2.6) and now addServer() works... So this is not a memcache issue, but a php_ext issue.
Anyway, setting "compatibility" => true is only mentioned in the manual, but doesn't seem to be implemented in ZF. When I switch back to the original php_memcached.dll from php.net I can't get it to work, even with "compatibility" => true
Any suggestions?
Posted by Fabien MARTY (fab) on 2009-04-25T06:03:31.000+0000
"compatibility" => true is a backend option of the SVN trunk version, it will be in 1.8 release of ZF