#39762 [Com]: PHPIniDir without php.ini make phpinfo() weird
| From: | tokian at hotmail dot com | Date: | Sun, 01 Apr 2007 16:51:51 +0000 |
| Subject: | #39762 [Com]: PHPIniDir without php.ini make phpinfo() weird | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969375964@lists.php.net to get a copy of this message | ||
ID: 39762
Comment by: tokian at hotmail 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:
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
Previous Comments:
------------------------------------------------------------------------
[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