Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

New Install Problem - Not reading ini

Status
Not open for further replies.

warchyld

IS-IT--Management
Aug 6, 2003
16
0
0
Hello -

Trying to upgrade from PHP4 to PHP5.0.4 on a Win2003/IIS6 box and having a problem getting it to read my php.ini file.
PHP is running - phpinfo() returns the info page.

However, I am specifying my SMTP server in my INI file, and I also have display errors=off, BUT when I try to run my form email script I receive an error saying mailserver "localhost" not found. Again, SMTP is specified, and in addition I should not be seeing errors at all.
My php.ini file is in my windows directory, and I've also tried setting registry key HKEY_LOCAL_MACHINE/PHP/IniFilePath and pointing it to my win directory, but that doesn't make any difference.
And yes, I'm using the new ini file that came with the PHP5.0.4 zip file, not my old 4 file.

Any ideas?
Thanks!
 
One common cause of this is that PHP is reading a different ini file than the one you're editing.

Examine the output of phpinfo() and see what the value is for "Configuration File (php.ini) Path" is. Does it match the file you've been editing?


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
phpinfo() does indicate that it's reading from the windows directory.

This is pretty frustrating - All I've done, is take the php.ini-recommended file, rename it php.ini drop in my SMTP address and it just doesn't want to read my ini file.
I'll try starting from the php.ini-dist file and see if that does anything.

 
Yep,
Restarted web server, and I've even done multiple reboots on the box itself.
I also tried using the php.ini-dist instead - Same results - It just doesn't want to use the ini file. I've also checked permissions on the ini file - all seems normal there.
 
I got this to work - I'm an airhead.
When I added the registry key for IniFilePath I set it to just c:\windows
It needs to be c:\windows\php.ini

It still doesn't explain why it wouldn't work without the registry key to begin with (Never needed it for PHP4, and I tried PHP5.0.4 on a Win2000 box and didn't need it) but whatever, it's working now.

Thanks for the suggestions Sleipnir
 
That is strange. I hadn't thought about the registry, as I do all my PHP running on Linux.

I strongly recommend that you turn in to PHP a bug report on this.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top