PHP Extension (memcache|memcached) not showing in phpinfo() but showing in php -m and php -i?

Posted by Auston on Stack Overflow See other posts from Stack Overflow or by Auston
Published on 2010-05-14T07:02:27Z Indexed on 2010/05/14 7:04 UTC
Read the original article Hit count: 249

Filed under:
|
|
|

I am getting both modules listed as installed / configured when I use:

php -m

or if I use:

php -i

but when I use:

$m = new Memcache;
// or
$m = new Memcache();
// or
$m = new Memcached();
//or 
$m = new Memcached;

I get the following error:

Fatal error: Class 'Memcached' not found

I am running on a Mac - OS X (10.5.7) with default install of apache & php. Additionally, I have memcached running as a daemon on 127.0.0.1:11211 and libmemcache as required by the php-memcached library. I have restarted apache tons of times and even done a machine restart.

Does anyone know why the modules/extensions show up in the command line but not in my phpinfo()? I am literally stumped, after 3 hours of googling, I am just about ready to give up.

© Stack Overflow or respective owner

Related posts about php

Related posts about php5