#33882 [Opn->Csd]: php.ini search path with CLI api
| From: | hholzgra@php.net | Date: | Wed, 27 Jul 2005 15:10:55 +0000 |
| Subject: | #33882 [Opn->Csd]: php.ini search path with CLI api | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-82538@lists.php.net to get a copy of this message | ||
ID: 33882
Updated by: hholzgra@php.net
Reported By: hartmut@php.net
-Status: Open
+Status: Closed
Bug Type: *Configuration Issues
Operating System: linux
PHP Version: 5CVS-2005-07-27 (dev)
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2005-07-27 14:52:59] hartmut@php.net
Description:
------------
the first place to look for a php.ini is supposed to be
the directory where the php binary is installed
this is done by taking the dirname out of
sapi_module.executable_location
and then appending php.ini
on the other hand sapi_module.executable_location
is just a copy of argv[0] for CLI
so if the CLI is just called as 'php' it looks for php.ini
in "php/php.ini"
a realpath() call should be added somewhere to fix this
Reproduce code:
---------------
strace php 2>&1 | grep php.ini
Expected result:
----------------
php.ini looked for in /usr/local/bin/php.ini
Actual result:
--------------
php.ini looked for in php/php.ini
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=33882&edit=1