Command-line execution of php is ignoring php.ini
| From: | Jeff Tanner | Date: | Fri, 26 Oct 2007 18:56:42 +0000 |
| Subject: | Command-line execution of php is ignoring php.ini | ||
| Groups: | php.install | ||
| Request: | Send a blank email to php-install+get-18319@lists.php.net to get a copy of this message | ||
Running php from command line is ignoring php.ini file which resides
within /etc/php5/apache2/.
memory_limit=16M
[xdebug] module extension
I built php using --with-config-file-path=/etc/php5/apache2/
Calling from browser a php script with *phpinfo()*, the php.ini file is
being read correctly from /etc/php5/apache2/, and expected module
extensions are present:
Configuration File (php.ini) Path => /etc/php5/apache2/php.ini
memory_limit => 16M
[xdebug] module extension exists
Calling *> php -i* from command line, it states that it is using the
same config path, but it is ignoring any modifications to this config
file:
Configuration File (php.ini) Path => /etc/php5/apache2/php.ini
memory_limit => 8M
[xdebug] module extension does not exists
However, if forcing the config file path when calling *> php -i -c
/etc/php5/apache2/php.ini*, the php.ini file is being read correctly:
memory_limit => 16M
[xdebug] module extension exists
What is happening?
Note: I copied the /etc/php5/apache2/php.ini to /etc/php5/cli/php.ini,
but this did not make any difference.
Thanks
Jeff in Seattle