[英]Fatal error: Class 'Memcached' not found in /my/path
When I try : 当我尝试:
$mc= new Memcached();
I get 我懂了
Fatal error: Class 'Memcached' not found in /my/path
phpinfo says that /etc/php5/apache2/conf.d/20-memcached.ini is loaded as an additional .ini file. phpinfo表示/etc/php5/apache2/conf.d/20-memcached.ini是作为其他.ini文件加载的。
The content of this file is this one : 该文件的内容是这个:
; uncomment the next line to enable the module
extension=memcached.so
dpkg --get-selections | dpkg --get-selections | grep memcached
grep memcached
libmemcached6 install
memcached install
php5-memcached install
Kubuntu Apache 2.0 php 5.4.4-1 Kubuntu Apache 2.0 PHP 5.4.4-1
Why do I have this fatal error ? 为什么会有这个致命错误?
Based on your comment I don't think you have it installed properly. 根据您的评论,我认为您没有正确安装它。 Make sure you see a see a section in phpinfo() such as:
确保您在phpinfo()中看到了see一节,例如:
memcached
memcached support enabled
Version x.x.x
libmemcached version x.xx
1) Get libmemcached
1)获取
libmemcached
2) Configure the package 2)配置软件包
3) Make install sudo make install libmemcached
3)进行安装
sudo make install libmemcached
4) Try Installing with Install with sudo pecl install memcached
4)尝试使用
sudo pecl install memcached
5) make sure you have extension = memcached.so
in your php.ini 5)确保您的php.ini中具有
extension = memcached.so
Restart Apache 重新启动Apache
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.