ZF-6405: Memcache->addServer causes fatal error on windows


When using the Windows Memcached port ( or…) 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


Problem solved using the Win32 extension from

You have to set a backend option "compatibility" => true to do that

The weird thing is my problem was solved using the alternate php_memcached.dll from…

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 I can't get it to work, even with "compatibility" => true

Any suggestions?

"compatibility" => true is a backend option of the SVN trunk version, it will be in 1.8 release of ZF