Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Value of CLI running php --ini

Configuration File (php.ini) Path: /usr/local/lib
Loaded Configuration File:         /usr/local/lib/php.ini

Value of phpinfo from my nginx/php-fpm web server page:

Loaded Configuration File   /etc/php.ini 

So my issue is that the web server php is not loading the MySQL extension causing MySQL not to work. The CLI php is though (proper php.ini is /usr/local/lib/php.ini).

share|improve this question

1 Answer

Are they even the same versions? php -v on the command line and phpinfo via nginx?

You could look at doing a symlink from the /usr/local/lib/php.ini - if they are the same version. Backup the /etc/php.ini first of course, as there might be some memory / other settings you need to port over.

Edit;

Thinking about it. It sounds like /etc/php.ini is from a package but /usr/local/lib is from a custom install of PHP. You'd probably be better off to change nginx (check the configs) instead of a symblink.

share|improve this answer

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.