我粘贴了 php.net 中的示例在 php 中使用 memcached,我得到:
Fatal error: Class 'Memcache' not found
我的 php.ini 中有这个:
[memcache]
memcache.hash_strategy = "consistent"
memcache.max_failover_attemps = 100
memcache.allow_failover = 1
以下是分别来自 php -i 和 php -m 的信息:
php -i | grep -i memcache
memcached
memcached support => enabled
libmemcached version => 0.37
Registered save handlers => files user sqlite memcachedphp -m | grep -i memcache
memcached
所以 php 似乎已将 memcached 作为一个模块加载,并且 php info 说它已加载并且正在使用 v .37。我还没有通过 apache 尝试过,我现在只是通过 cli 使用它。有什么想法吗?
最佳答案
关于PHP memcached fatal error : Class 'Memcache' not found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2659035/