#32576 [NEW]: Registry key use needs more information

From: Date: Mon, 04 Apr 2005 20:21:54 +0000
Subject: #32576 [NEW]: Registry key use needs more information
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969367413@lists.php.net to get a copy of this message
From: peter dot ordal at rochester dot edu Operating system: Windows Server 2003 PHP version: 5.0.4 PHP Bug Type: Documentation problem Bug description: Registry key use needs more information 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 bug report at http://bugs.php.net/?id=32576&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32576&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32576&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32576&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32576&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32576&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32576&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32576&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32576&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32576&r=support Expected behavior: http://bugs.php.net/fix.php?id=32576&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32576&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32576&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32576&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32576&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32576&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32576&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32576&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32576&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32576&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32576&r=mysqlcfg

« previous php.doc (#969367413) next »