php.ini settings not registering

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

php.ini settings not registering

Post 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?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Re: php.ini settings not registering

Post 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.
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post by freaknut »

Doh...it's pointing to C:\WINDOWS. No loaded config file.

How do I change it to point to C:\PHP5?
miro_igov
Forum Contributor
Posts: 485
Joined: Fri Mar 31, 2006 5:06 am
Location: Bulgaria

Post by miro_igov »

8O no loaded config file :lol:
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post 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
User avatar
stereofrog
Forum Contributor
Posts: 386
Joined: Mon Dec 04, 2006 6:10 am

Post 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.
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post 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?
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post 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?
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post 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.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post 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.
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post 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.
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post 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.
freaknut
Forum Newbie
Posts: 13
Joined: Thu Aug 16, 2007 9:31 am

Post 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.
Post Reply