haku Posted April 8, 2011 Share Posted April 8, 2011 I have a PHP extension (memcached) that I cannot get to load. In php_info(), I see this: Configuration File (php.ini) Path File (php.ini) Path: /usr/lib I have edited /usr/lib/php.ini and added the following line: extension=memcached.so My extension_dir (from php_info()) is: /usr/lib/php/extensions/no-debug-non-zts-20060613 and when I execute: ls -l /usr/lib/php/extensions/no-debug-non-zts-20060613 I can see this line: -rwxr-xr-x 1 root root 127313 Apr 8 05:14 memcached.so* So, it appears that I have the right directive in php.ini, in the proper php.ini, and the extension is in the proper extensions directory, with a permission level that should let it be run (it's the same as the other modules in the directory), yet I cannot get memcached to show up on php_info() whatsoever. I'm new to installing extensions, so I have no idea why it's not working. I've restarted the server (using apachectl -k restart) but that doesn't help. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/ Share on other sites More sharing options...
betterphp Posted April 8, 2011 Share Posted April 8, 2011 I think it should be extension = "memcached.so" but if you are not getting start-up errors that its obviously fine the way you have it. Everything looks right as you say, does the -k you pass to apache2ctl mean graceful reload ? if so you need to not do that. I usually call the init.d script directly to restart /etc/init.d/apache2 restart although if you are restarting the server then it should be fine. If you try somethign from the command line like php phpinfo.php where phpinfo.php is just a file that does phpinfo() you might get an explanation as to why its not loading. Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1198785 Share on other sites More sharing options...
haku Posted April 8, 2011 Author Share Posted April 8, 2011 Thanks for the thoughts - I have tried writing the extension with quotes, but it didn't work, and none of the other extensions (that actually work) are written with quotes. I've got php_info() on the server, but it has no reference to memcached one way or another. Thanks for the thoughts though. Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1198825 Share on other sites More sharing options...
betterphp Posted April 8, 2011 Share Posted April 8, 2011 what about trying php from the shell ? That is most likely to tell you why the module cannot be loaded. Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1198985 Share on other sites More sharing options...
haku Posted April 20, 2011 Author Share Posted April 20, 2011 How do I do that? I'm actually having the same issue rise again with a different PHP module. Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1204125 Share on other sites More sharing options...
haku Posted April 20, 2011 Author Share Posted April 20, 2011 Interesting. I've found that I can enable the extension by adding the directive to my local php.ini for the site, but the directive added to the master php.ini (location confirmed in phpinfo()) doesn't work. Strange. Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1204147 Share on other sites More sharing options...
betterphp Posted April 21, 2011 Share Posted April 21, 2011 How do I do that? I'm actually having the same issue rise again with a different PHP module. you would run php -r "echo 'test';" at a terminal prompt. Sorry for not getting back to you for so long Quote Link to comment https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/#findComment-1204280 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.