Memcache Class Not Found

Nathan Schmidt nathan at pbwiki.com
Sun Aug 19 19:59:04 UTC 2007


Also it's quite possible to configure php and memcached properly for  
command-line mode but not for e.g. apache. On debian we have /etc/ 
php4/apache/php.ini and /etc/php4/cli/php.ini, I've made the reverse  
mistake when configuring batch processing machines - memcache client  
works on the web side but not the cli.

-n



On Aug 19, 2007, at 12:55 PM, John Kramlich wrote:

> It may be possible that the memcache configuration parameters are  
> in your php.ini file but that PHP was not compiled with the  
> memcache extension.  When I perform the following command on our  
> server at Gigoit.org:
>
> php -i | grep memcache
>
> I get the following output:
>
> Configure Command =>  './configure' '--with-kerberos' '--with-bz2'  
> '--with-gd' '--with-imap' '--with-imap-ssl' '--enable-gd-native- 
> ttf' '--with-png' '--with-png-dir=/usr/local/lib' '--with-jpeg' '-- 
> with-jpeg-dir=/usr/local/lib' '--with-zlib' '--with-ttf' '--with- 
> freetype' '--with-xpm' '--with-gettext' '--with-gmp' '--with-mysql=/ 
> var/lib/mysql' '--with-mysqli=/usr/bin/mysql_config' '--enable- 
> pspell' '--with-xml' '--with-xmlrpc=shared' '--with-mcrypt=/usr/ 
> local/lib' '--with-apxs2=/usr/local/apache2/bin/apxs' '--enable- 
> bcmath' '--enable-calendar' '--enable-ftp' '--enable- 
> mbstring=shared' '--enable-memcache' '--enable-memory-limit' '-- 
> enable-mime-magic' '--enable-rewrite' '--enable-so' '--enable- 
> sockets' '--enable-speling'
> memcache
> memcache support => enabled
> memcache.allow_failover => 1 => 1
> memcache.chunk_size => 8192 => 8192
> memcache.default_port => 11211 => 11211
> memcache.max_failover_attempts => 20 => 20
>
> Note that when PHP was compiled the option '--enable-memcache' was  
> used.  Admittedly my partner was the one who setup the server so I  
> am not the most knowledgeable.  However, this may give you  
> something to look into.
>
> - John
>
> Suleman Ali wrote:
>> I'm seeing this PHP error when trying to instantiate a Memcache  
>> object:
>>
>> Fatal error: Class 'Memcache' not found in /home/sali/public_html/ 
>> doubledare/lib2.php on line 2491
>>
>>
>> The PHP memcached client is installed correctly as far as I can  
>> tell as php -i | grep memcache returns the following:
>>
>> [root at esgut3 doubledare]# php -i | grep memcache
>> memcache
>> memcache support => enabled
>> memcache.allow_failover => 1 => 1
>> memcache.chunk_size => 8192 => 8192
>> memcache.default_port => 11211 => 11211
>> memcache.max_failover_attempts => 20 => 20
>> Registered save handlers => files user sqlite memcache
>>
>>
>> Any ideas what I'm doing wrong?
>



More information about the memcached mailing list