ID: 39762 Comment by: nexxure dot inc at gmail dot com Reported By: ceo at l-i-e dot com Status: Open Bug Type: Documentation problem Operating System: Windows XP PHP Version: Irrelevant New Comment:
if you let the php installer do the editing of the httpd.conf file, it puts in backslashes (\). It also gets the order of the directives wrong, it puts the phpinidir before the loadmodule. so, you have to change the order of the directives and change the backslashes to forward slashes (/). it worked for me. Previous Comments: ------------------------------------------------------------------------ [2007-04-01 23:13:50] ceo at l-i-e dot com The PHPIniDir setting was after the LoadModule. I simply hadn't yet put a php.ini file in the directory I had set as the correct directory. In other words: If the user configures Apache to look for php.ini in dir X, and there is no php.ini there, current behaviour seems to be to start looking for it in all the usual locations, and then reporting it's not in Y (the last usual location), rather than reporting that it's not in X. Perhaps I'm just expecting the wrong thing, but if Apache is configured to look in X, it ought to just look in X, and quit, and say I couldn't find it in X. [shrug] ------------------------------------------------------------------------ [2007-04-01 16:51:51] tokian at hotmail dot com Try putting LoadModule php5_module "C:/php/php5apache2_2.dll" PHPIniDir "C:/php" in that order it seems that PHPIniDir has to be set after LoadModule ------------------------------------------------------------------------ [2006-12-07 01:28:07] ceo at l-i-e dot com Description: ------------ I'm a step-by-step kind of guy, so I double-check things as I go. After installing Apache 2.2 and PHP 5.2.0, I checked my phpinfo() Despite a PHPIniDir setting of "C:/php" it claimed that php.ini was being "found" in "C:\WINDOWS" In reality, it wasn't finding php.ini at all, as I hadn't created one yet. Reproduce code: --------------- Put PHPIniDir into httpd.conf, and have no php.ini file anywhere that PHP can find. Expected result: ---------------- I expected phpinfo() to tell me "C:\php" was the directory it had TRIED to find php.ini in. And without php.ini in there, I'd know that I needed to put php.ini in "C:\php" Actual result: -------------- phpinfo() is telling me that it is looking in "C:\WINDOWS" for the php.ini file, despite my PHPIniDir setting. So I spent a lot of time trying to figure out why my PHPIniDir setting was not taking effect. It *was* taking effect, but PHP's search ended up in C:\Windows in desparation, and phpinfo() output made me believe I hadn't set PHPIniDir, rather than I hadn't copied a php.ini file yet. I realize this is pretty picuyane, and that php *DOES* search in multiple places for php.ini But if httpd.conf is specifically configured to search for php.ini with PHPIniDir, I believe phpinfo() output should reflect that setting, even if php.ini isn't there yet. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39762&edit=1