-----Original Message-----
From: Bastien Koert [mailto:phps...@gmail.com] 
Sent: 25 June 2009 03:11 PM
To: Tir
Cc: php-general@lists.php.net
Subject: Re: [PHP] PHP doesn't see php.ini

On Wed, Jun 24, 2009 at 8:32 AM, Tir<tirsa...@yandex.ru> wrote:
> When i installed PHP, I had written to my httpd.conf PHPIniDir 
> "c:/php". But
> phpinfo() returns "C:\WINDOWS" in "Configuration File (php.ini) Path" 
> row and right path to my php.ini in "Loaded Configuration File". It 
> looks like php.ini really isn't used. I think so because when i try to 
> enable MySQL extension it doesn't work ("extension=php_mysql.dll", 
> "extension=php_mysqli.dll" and "extension=php_pdo_mysql.dll" is 
> uncommented, "extension_dir" is correct, libmysql.dll is copied to
> I've tried to write to php.ini an abracadabra. But I haven't received 
> an error as i expected. I've tried to rename php.ini. phpinfo() has 
> returned "(none)" in "Loaded Configuration File" row instead of 
> "c:\php\php.ini" as that was before. But PHP still worked. It worked 
> without php.ini. It seems very strange. I've searched another php.ini 
> on my system. There is no another one. What's wrong? Why doesn't PHP use
php.ini file?
> --

Did you use an installer or have another version of php installed at some


Cat, the other other white meat

On my Windows I see the same thing - "Configuration File (php.ini) Path"
points to C:\WINDOWS (even though there is no php.ini there) and "Loaded
Configuration File" points to the dir where the php.ini actuall is. My setup
(PHP 5.2.6) works fine. Presume you did restart apache after making the
change? It looks like your php is using your php.ini since phpinfo reports
(none) when you rename it. Is there anything in your phpinfo output that
relates to your php.ini? Maybe some error near the beginning of php.ini
causes php to stop loading the ini file? Check that the "extension_dir" in
phpinfo agrees with the "extension_dir" in your php.ini.

Maybe try enabling error logging in the php.ini and check the log file - I
use apache\logs\phperror.log and invalid extension loading is definitely
reported there (I've had this problem before). In php.ini set
"log_errors=On" and set "error_log=c:\apache\logs\phperror.log" (or wherever
your apache is installed). Restart apache and check the phperror.log file.
If you find nothing then create a dummy entry to force an error, something
like "extension=php_dummy.dll" to check that the error logging is working.
If your logging is working and there is no error reported for loading the
mysql extension, and you still see no entry for mysql in phpinfo output,
then you have a different problem, maybe a mysql installation problem.


"Cat, the other other white meat" - looks like the economic downturn hit
really hard... 
Does it go with "Weed, the other green tea"?

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to