php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34451 PHP as Apache module doesn't respect PHPRC and PATH
Submitted: 2005-09-10 04:54 UTC Modified: 2005-09-10 05:37 UTC
From: rvt at ok dot ru Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.4.0 OS: Windows XP Pro (WinXP)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rvt at ok dot ru
New email:
PHP Version: OS:

 

 [2005-09-10 04:54 UTC] rvt at ok dot ru
Description:
------------
Running PHP under Apache 1.3.33 as a server module, I couldn't take advantage of using environment variables.

As described at http://ru.php.net/manual/en/install.windows.manual.php:
-------------------------------------------------------
Previous editions of the manual suggest moving various ini and DLL files into your SYSTEM (i.e. C:\WINDOWS) folder ... the preferred method for installing PHP is to keep all PHP related files in one directory and have this directory available to your systems PATH.
-------------------------------------------------------

Reproduce code:
---------------
My PHP installation resides in "c:\program files\php" along with php.ini, php4ts.dll and other standard for PHP files and folders.

System environment variables are:
Path = c:\program files\php;c:\program files\php\dlls;c:\program files\borland\VBroker\bin;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel

PHPRC = c:\program files\php

Actual result:
--------------
Apache founds php4apache.dll in sapi directory, but

1) Apache does not start until php4ts.dll is in "sapi" or "windows" directory or in the same one with apache.exe.

2) When php4ts.dll is in any directory from ones specified above, Apache is launched but php.ini is not processed until resides in "windows" directory or in the same one with apache.exe. When php.ini is not processed, phpinfo() claims "C:\WINDOWS" as "Configuration File (php.ini) Path".

3) When php4ts.dll and php.ini are found and there are extensions which require additional dlls, these dlls are also not found (although, they really are in "dlls" directory and the directory is in Path). For every extension the "Unable to load dynamic library" message pops up with the right path to the extension. (I use domxml, gettext, mhash and xslt)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-10 05:37 UTC] rvt at ok dot ru
Finally, it started to work after reboot, (!) not just log off. It seems to me that the problem was beacuse apache runs under NT AUTHORITY\SYSTEM user. It should reload its environment variables on OS startup only :)

Be careful.
Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC