Page 1 of 1

php.ini settings not registering

Posted: Thu Aug 16, 2007 9:36 am
by freaknut
Any changes I make to the php.ini file don't make the slightest change with my actual php configuration. I've restarted IIS, and even rebooted my server.

For example: I set SMTP = mail.mydomainname.com, and smtp_port = 2525, but everytime I use the mail() function, it tries to connect to localhost port 25 and fails.

I've also set it not to display error messages as output and to create a log file instead, but it doesn't do either.

Again, after making these changes, I restart IIS, and I've even rebooted my server once.

Any thoughts?

Re: php.ini settings not registering

Posted: Thu Aug 16, 2007 9:42 am
by superdezign
freaknut wrote:Any thoughts?
You are likely editing the wrong file. Run phpinfo() and tell us what it says about the configuration path, and the loaded configuration file.

Posted: Thu Aug 16, 2007 9:54 am
by freaknut
Doh...it's pointing to C:\WINDOWS. No loaded config file.

How do I change it to point to C:\PHP5?

Posted: Thu Aug 16, 2007 12:21 pm
by miro_igov
8O no loaded config file :lol:

Posted: Thu Aug 16, 2007 1:06 pm
by freaknut
I copied my php.ini file into the Windows directory and restarted IIS, so it has a config file loaded now, but I'd still like to have it read from C:\PHP5 instead of C:\WINDOWS

Posted: Thu Aug 16, 2007 2:15 pm
by stereofrog
http://www.php.net/manual/en/configuration.php explains where php expects to find php.ini and how you can change the default location.

Posted: Thu Aug 16, 2007 2:52 pm
by freaknut
I went through that list and didn't find any registry keys (I installed with a .zip file...I'm assuming that's why), so I went ahead and added HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2.3\IniFilePath, but it's still not finding the right directory.

I don't know if I'm adding the key right.

EDIT*Does it make a difference if I installed php with the executable first, but then uninstalled it from add/remove programs?

Posted: Thu Aug 16, 2007 5:32 pm
by superdezign
freaknut wrote:I went through that list and didn't find any registry keys (I installed with a .zip file...I'm assuming that's why), so I went ahead and added HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.2.3\IniFilePath, but it's still not finding the right directory.

I don't know if I'm adding the key right.
The registry key never worked for me. Apache 2.2 has a PHPIniDir directive, and it was the only method that worked for me. Maybe you should see if IIS has something similar.
freaknut wrote:EDIT*Does it make a difference if I installed php with the executable first, but then uninstalled it from add/remove programs?
Umm... I'm 90% sure PHP doesn't work that way. Do you mean the package you used, i.e. XAMPP?

Posted: Thu Aug 16, 2007 8:41 pm
by freaknut
On http://us3.php.net/downloads.php there is an installer. It's a .msi. I'm not sure why I downloaded that one first, but after running the install, I uninstalled it through Add/Remove programs and proceeded to install it properly using the .zip file.

Posted: Fri Aug 17, 2007 6:38 am
by superdezign
freaknut wrote:On http://us3.php.net/downloads.php there is an installer. It's a .msi. I'm not sure why I downloaded that one first, but after running the install, I uninstalled it through Add/Remove programs and proceeded to install it properly using the .zip file.
Interesting. I guess they've tried to simplify the process too much.

Posted: Fri Aug 17, 2007 10:20 am
by freaknut
Hmm. Nothing seems to solve my issue.

I did the following as well as added a registry key, but to no avail:
http://www.php.net/manual/en/faq.instal ... .addtopath
http://www.php.net/manual/en/faq.instal ... tion.phprc

I'm still crawling google looking for an answer. Hope I find one soon. I don't like the idea of putting half my php files in the windows folder.

Posted: Fri Aug 17, 2007 10:38 am
by superdezign
freaknut wrote:I'm still crawling google looking for an answer. Hope I find one soon. I don't like the idea of putting half my php files in the windows folder.
Firstly, I'm pretty sure that php.ini is the only file that you'd need to put in there. Secondly, it's Windows... What do you expect? The WINDOWS folder is where it all happens.

Posted: Fri Aug 17, 2007 10:42 am
by freaknut
If you remember from my other thread, I had an issue where I needed to copy a .dll into the Windows folder as well since that's where the php.ini file is.

I'll live with it for now, since I don't have the time to keep looking for an answer, but I hope to eventually find one.