0

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).

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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