The php that run on the webserver and the CLI version is not using the same php.ini file. If I do a command php --ini, it show this
Configuration File (php.ini) Path: C:\Windows
Loaded Configuration File: C:\wamp\bin\php\php5.3.8\php.ini
Scan for additional .ini files in: (none)
Additional .ini files parsed: (none)
while my web version uses the php.ini in C:\wamp\bin\apache\Apache2.2.21\bin\php.ini. This is probably very common for people using wamp.
How do I change the Loaded Configuration File to read from C:\wamp\bin\apache\Apache2.2.21\bin\php.ini so I don’t have to maintain 2 different php.ini versions?
Per http://php.net/configuration.file:
For CLI, your best bet is probably either to set the
$PHPRCenvironment variable for the account that will be executing scripts, or recompile PHP with a different--with-config-file-pathconfiguration setting.You can also override the php.ini search dir on a per-execution basis by specifying the
-coption when invoking PHP: