简体   繁体   English

找不到PHP类别“ Memcache”

[英]Php Class 'Memcache' not found

I have project with plain php and in some part have $memcache = new Memcache; 我有一个普通的php项目,在某些方面有$memcache = new Memcache; I debug and when beginning this line have fatal error - app die I check in my php info I have 我调试并且开始此行时出现致命错误-应用程序死亡我检查了我的PHP信息

memcached

memcached    support    enabled
             Version    2.2.0
libmemcached version    1.0.18

I check 我检查

ivan@ivan-PC:/usr/local/bin$ ps aux | grep memcached
ivan      2857  0.0  0.0  22804   960 pts/27   S+   13:44   0:00 grep --color=auto memcached
memcache 24913  0.0  0.0 325536  2160 ?        Ssl  11:55   0:00 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1

in log 在日志中

Class 'Memcache' not found

in console I run memcache, but still app die. 在控制台中,我运行了memcache,但仍然死了。 what need to do check ? 需要做什么检查?

Memcache and Memcached are two different libraries. MemcacheMemcached是两个不同的库。

Your php info says you have installed memcached . 您的php信息表明您已经安装了memcached Error says you are using memcache . 错误提示您正在使用memcache

Try installing memcache and you should be fine. 尝试安装memcache ,您应该可以。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM