Leaseweb / LswMemcacheBundle

Symfony bundle for Memcache Doctrine caching and session storage in the Web Debug Toolbar.
MIT License
202 stars 57 forks source link

Class 'MemcachePool' not found in /vendor/leaseweb/memcache-bundle/Lsw/MemcacheBundle/Cache/LoggingMemcache.php on line 4 #54

Closed AlexandreHagen closed 9 years ago

AlexandreHagen commented 9 years ago

Hi

I get this error : Class 'MemcachePool' not found in /vendor/leaseweb/memcache-bundle/Lsw/MemcacheBundle/Cache/LoggingMemcache.php on line 4

But everything seem to be set correctly (php -i):

.....
memcache

memcache support => enabled
Version => 3.0.8
Revision => $Revision: 329835 $

Directive => Local Value => Master Value
memcache.allow_failover => 1 => 1
memcache.chunk_size => 32768 => 32768
memcache.compress_threshold => 20000 => 20000
memcache.default_port => 11211 => 11211
memcache.hash_function => crc32 => crc32
memcache.hash_strategy => consistent => consistent
memcache.lock_timeout => 15 => 15
memcache.max_failover_attempts => 20 => 20
memcache.protocol => ascii => ascii
memcache.redundancy => 1 => 1
memcache.session_redundancy => 2 => 2
......

And my config_dev.yml:

lsw_memcache:
    session:
        pool: default
    pools:
        default:
            servers:
              - { host: localhost, tcp_port: 11211  }

I get also that during a php app/console cache:clear:

Clearing the cache for the dev environment with debug true
dyld: lazy symbol binding failed: Symbol not found: _mmc_queue_free
  Referenced from: /usr/local/opt/php56-memcache/memcache.so
  Expected in: flat namespace

dyld: Symbol not found: _mmc_queue_free
  Referenced from: /usr/local/opt/php56-memcache/memcache.so
  Expected in: flat namespace

$ telnet localhost 11211 give:

Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying fe80::1...
telnet: connect to address fe80::1: Connection refused
telnet: Unable to connect to remote host

I use leaseweb/memcache-bundle v2.1.2, PHP 5.6.11, Symfony 2.6.9 and Homebrew 0.9.5

Thanks for help

mevdschee commented 9 years ago

For this error:

dyld: lazy symbol binding failed: Symbol not found: _mmc_queue_free

Does this help?

Rebuild memcached with -fgnu89-inline in CFLAGS/CXXFLAGS. What happens is the inline keyword under new rules causes _mmc_queue_pop to inline in all instances, leaving nothing for memcache.so to dynamically link to. – David Schwartz

See: http://serverfault.com/questions/386392/troubles-with-memcache-so

mevdschee commented 9 years ago

For this error:

telnet: connect to address ::1: Connection refused

Just to be sure: you should also be running memcached (the server, not the extension). Are you running that? You can debug it with the telnet command you provided. For more info see: http://memcached.org/

AlexandreHagen commented 9 years ago

That it ! I just did not install memcached. Because of you docs said: This bundle no longer uses the PHP "memcached" extension that uses "libmemcached", see "Considerations", I was confused.

I think that would be more understandable: This bundle no longer uses the "php-memcached" extension that uses "libmemcached", see "Considerations"

Thanks for you help !

mevdschee commented 9 years ago

Thank you for the feedback.