Issues

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

Problem solved using the Win32 extension from http://downloads.php.net/pierre/

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 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?

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