Re: Command-line execution of php is ignoring php.ini

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi Jeff. You may have multiple installations of php CLI on your machine.

I noticed this when compiling php myself. There was already a php installed on my machine, so this caused some confusion, when I thought I was running the php I installed myself.

Regards

Keith


On Fri, 26 Oct 2007, Jeff Tanner wrote:

To: php-install@xxxxxxxxxxxxx
From: Jeff Tanner <jeff.tanner@xxxxxxxxxxxxxxxx>
Subject:  Command-line execution of php is ignoring php.ini

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





--
------------------------------------------------------------
http://www.karsites.net
http://www.raised-from-the-dead.org.uk

This email address is challenge-response protected with
http://www.tmda.net
------------------------------------------------------------

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux