Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Okay, I'm on CentOS 5.3 and I'm running an nginx/php/mysql server stack with FastCGI. One of my Twitter apps requires PHP to connect to the Twitter API, which uses OAuth. So I installed the OAuth module with PECL and confirmed that oauth.so was compiled in /usr/lib/php/modules and extension=oauth.so was added in PHP.ini. However, when I try to access the PHP file I get a fatal error, the OAuth class is not found. So I checked phpinfo() and the PHP.ini file hasn't been reloaded apparently.

So, how do I force PHP with FastCGI to update its configuration without restarting the server?

share|improve this question
add comment

3 Answers

Php rereads its configuration on every request. You can check it by changing any var in php .ini ( like max mem ) and then see update in phpinfo.

can use your module in list of lodaded .so files in phpinfo?

share|improve this answer
    
I found the problem, it was loading the .ini file but for some reason the Oauth.so was failing silently because it was missing a dependency. It installed fine however, which was weird. Anyway, the solution was installing the curl-devel package. –  Chris Aug 10 '10 at 0:27
add comment

How do you invoke PHP? If you're by chance are using PHP-FPM, you might need to stop and start it again (at least this applied to older versions, not sure if this is still the case).

share|improve this answer
add comment

I found the solution was installing the curl-devel package... The module was failing to load (silently...).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.