ID: 32576 User updated by: peter dot ordal at rochester dot edu Reported By: peter dot ordal at rochester dot edu Status: Bogus Bug Type: Documentation problem Operating System: Windows Server 2003 PHP Version: 5.0.4 New Comment:
The problem was indeed the quotes. I don't play in the registry much, hence my mistake. I know I've seen them on other keys, but I guess not file paths. Also regarding the slashes, I mistyped the bug report but they were correct in the registry key. Previous Comments: ------------------------------------------------------------------------ [2005-04-05 10:58:32] [EMAIL PROTECTED] You can't use quotes around the value stored in IniFilePath. ------------------------------------------------------------------------ [2005-04-05 09:52:22] [EMAIL PROTECTED] Can you please change the forward slash in "C:\Program Files/php-5.0.4-Win32" to backslash and test it? ------------------------------------------------------------------------ [2005-04-04 22:21:53] peter dot ordal at rochester dot edu Description: ------------ I read in install.txt that I could put a path for my php.ini file in HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath. This applies to PHP 5 only as I understand it. I tried that, but PHP 5 kept accessing the php.ini in c:\winodws. It took me a while to figure out, and I had to download Filemon (www.systeminternals.com) to figure it out. It turns out that, under IIS 6 at least, whatever you put in HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath is actually appended to the web server executable root directory, and does not stand on its own (as the documentation implies). In my case, IIS looked for the ini file at C:\windows\system32\inetsrv\"C:\Program Files/php-5.0.4-Win32"\php.ini which is not valid. I reconfigured the variable to be ../../../Program Files/php-5.0.4-Win32, and things worked. Note the exclusion of quotes is important. Reproduce code: --------------- Here is the context from install.txt; Copy your chosen ini-file to a directory that PHP is able to find and rename it to php.ini. PHP searches for php.ini in the following locations (in order): * PHPIniDir directive (Apache 2 module only) * HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath * The PHPRC environment variable * Directory of PHP (for CLI), or the web server's directory (for SAPI modules) * Windows directory (C:\windows or C:\winnt) Expected result: ---------------- For IIS to read C:\Program Files/php-5.0.4-Win32 for my php.ini when "C:\Program Files/php-5.0.4-Win32" is in the registry. Actual result: -------------- IIS read the invalid path C:\windows\system32\inetsrv\"C:\Program Files/php-5.0.4-Win32"\php.ini instead. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32576&edit=1