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 reports that the file / etc / php 5 / apache2 / conf.d / 20-memcached.ini is loaded as an additional .ini file.

The contents of this file are:

 ; uncomment the next line to enable the module extension=memcached.so 

dpkg --get-election | grep memcached

 libmemcached6 install memcached install php5-memcached install 

Kubuntu Apache 2.0 php 5.4.4-1

Why do I have this fatal error?

+4
source share
1 answer

Based on your comment, I don't think it is installed correctly. Make sure you see the section in phpinfo (), for example:

 memcached memcached support enabled Version xxx libmemcached version x.xx 

1) Get libmemcached

2) Configure the package

3) Install sudo make install libmemcached

4) Try installing with installation using sudo pecl install memcached

5) make sure you have extension = memcached.so in php.ini

Restart apache

+4
source

All Articles