I have a lot of differences between what is shown on console via php -i
, and what is shown by apache via phpinfo()
.
For instance:
- pdo_mysql exists for the first case, not for the second one.
include
directive works only for the first case.
PHP.INI file is the same:
Console php -i
:
Configuration File (php.ini) Path => /usr/local/etc/php/7.1
Loaded Configuration File => /usr/local/etc/php/7.1/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php/7.1/conf.d
Additional .ini files parsed => /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
PDO drivers => mysql, odbc, sqlite
VS Web phpinfo()
:
Configuration File (php.ini) Path /usr/local/lib
Loaded Configuration File /usr/local/etc/php/7.1/php.ini
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)
PDO drivers sqlite
For additional info, here is my apache configuration:
LoadModule php7_module /usr/libexec/apache2/libphp7.so
PHPINIDir /usr/local/etc/php/7.1/
AddHandler application/x-httpd-php .php
And include
directive in /usr/local/etc/php/7.1/php.ini
include=/usr/local/etc/php/7.1/conf.d/*.ini
I restarted apache after every php.ini modification.
Any idea, any clue?
cli-php.ini
file for command line. In other words you may have separate config files one for Apache one for the Command line. – ArtisticPhoenixext-xdebug.ini
– ArtisticPhoenix