Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Extension (memcache|memcached) not showing in phpinfo() but showing in php -m and php -i?
    primarykey
    data
    text
    <p>I am getting both modules listed as installed / configured when I use:</p> <pre><code>php -m </code></pre> <p>or if I use:</p> <pre><code>php -i </code></pre> <p>but when I use:</p> <pre><code>$m = new Memcache; // or $m = new Memcache(); // or $m = new Memcached(); //or $m = new Memcached; </code></pre> <p>I get the following error:</p> <pre><code>Fatal error: Class 'Memcached' not found </code></pre> <p>I am running on a Mac - OS X (10.5.7) with default install of apache &amp; 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.</p> <p>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.</p> <p>Also, please note, my phpinfo() outputs my ini files as follows AND they are both the exact same file:</p> <pre><code>Configuration File (php.ini) Path: /etc Loaded Configuration File: /private/etc/php.ini </code></pre> <p><strong>UPDATE:</strong></p> <p>Apache is failing to load the extension.</p> <blockquote> <p>[Fri May 14 04:22:26 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/memcached.so' - (null) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/memcache.so' - (null) in Unknown on line 0</p> </blockquote> <p>Does anyone know why or how this would happen? Both of the files referenced above DEFINITELY ARE there. Should I move this question to server fault?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload