Jump to content

php not reading/loading extension


Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/233038-php-not-readingloading-extension/
Share on other sites

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.

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.

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.