#33882 [NEW]: php.ini search path with CLI api
| From: | hartmut@php.net | Date: | Wed, 27 Jul 2005 12:53:00 +0000 |
| Subject: | #33882 [NEW]: php.ini search path with CLI api | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-82520@lists.php.net to get a copy of this message | ||
From: hartmut@php.net
Operating system: linux
PHP version: 5CVS-2005-07-27 (dev)
PHP Bug Type: *Configuration Issues
Bug description: php.ini search path with CLI api
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 bug report at http://bugs.php.net/?id=33882&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33882&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33882&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33882&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33882&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33882&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33882&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33882&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33882&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33882&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33882&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33882&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33882&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33882&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33882&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33882&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33882&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33882&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33882&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33882&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33882&r=mysqlcfg