Try:
php --ini
That will list all loaded configuration files.
If nothing is showing up, then you need to figure out where PHP was configured to look for configuration files when it was compiled.
php -i | grep Configure
Look for:
--with-config-file-path --with-config-file-scan-dir
That will give you the direcories PHP is configure to look for the ini file in. If you can't find anything there, then you need to ask on the support list/forum for wherever you downloaded PHP from. This is one of those things that is very distribution dependent.
Jamie Holly http://www.intoxination.net http://www.hollyit.net
On 6/1/2013 2:16 PM, Tim Johnson wrote:
- Jamie Holly hovercrafter@earthlink.net [130601 08:25]:
Drivers are loaded in the php.ini file. Depending on how PHP is installed, chances are you have a couple of php.ini files. One is for the webserver and the other is for CLI.
Aha!
You can find the location of the php.ini file the CLI is using by running this command:
php -i | grep Loaded
To check if that configuration file has PDO support in it:
php -i | grep PDO
You should get back something like this:
PDO PDO support => enabled PDO drivers => mysql, odbc, sqlite PDO Driver for MySQL => enabled PDO_ODBC PDO Driver for ODBC (unixODBC) => enabled PDO Driver for SQLite 3.x => enabled
If not, then you need to enable the extensions in php.ini.
OK. This is what I have : ###################################### linus:rocky tim$ php -i | grep Loaded Loaded Configuration File => (none) libXML Loaded Version => 20900 linus:rocky tim$ php54 -i | grep PDO PDO PDO support => enabled PDO drivers => mysql, sqlite PDO Driver for MySQL => enabled PDO Driver for SQLite 3.x => enabled ###################################### So... php (cli) is not finding a php.ini.
Where should it go?
BTW: php -i opens up a whole lot of analysis - thanks for that edification.