Req #51536 [Opn->Asn]: Add sapi binary location to php ini search path
| From: | pajoye@php.net | Date: | Mon, 12 Apr 2010 08:54:53 +0000 |
| Subject: | Req #51536 [Opn->Asn]: Add sapi binary location to php ini search path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-149502@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51536&edit=1
ID: 51536
Updated by: pajoye@php.net
Reported by: ksingla@php.net
Summary: Add sapi binary location to php ini search path
-Status: Open
+Status: Assigned
Type: Feature/Change Request
Package: *Configuration Issues
Operating System: Windows
PHP Version: 5.2.13
-Assigned To:
+Assigned To: pajoye
New Comment:
hi,
Yes, ini location detection is not so good right now and needs to be
improved.
However it has nothing to do with SxS per se. It is not need for FastCGI
as one can use php-cgi.exe -c c:\phpxxx\php.ini. The installer could do
that automatically, to support multiple install of the same versions
(per site configuaration) or multiple install of various versions.
I don't think we will and can make change this behavior in 5.2. Please
note that SxS support won't be done for 5.2, trunk will have it,
whatever will be this version.
Previous Comments:
------------------------------------------------------------------------
[2010-04-12 00:06:17] ksingla@php.net
Description:
------------
PHP searches php.ini in the binary location which is retrieved using
GetModuleFileName (first parameter to GetModuleFileName is NULL). This
will return path to current *executable* which won't be path to php sapi
binary in case of dlls. For IIS, location of w3wp.exe which is
%windir%\system32\inetsrv\ will be added to php ini search path. Is this
intentional? Can we change this code to make it look for php.ini in the
folder where php sapi binary is present? Without this fix, users running
non-cgi SAPIs are required to set PHPRC environment variable or
IniFilePath registry key to make PHP pick php.ini in the php install
folder.
If this bug is fixed, windows installer can stop setting PHPRC path to
[installdir] and will be able to support side-by-side (SxS) install of
PHP 5.2 and PHP 5.3. For installer to support SxS install, this change
is required in PHP 5.2 and PHP 5.3.
If we are worried about this being breaking change, we can just *add*
php sapi binary location to php ini search path.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51536&edit=1