For Programmers: Free Programming Magazines  


Home > Archive > PHP Installation > October 2007 > Command-line execution of php is ignoring php.ini









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Command-line execution of php is ignoring php.ini
Jeff Tanner

2007-10-26, 7:03 pm

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




Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com