Jump to content

Archived

This topic is now archived and is closed to further replies.

speals

php.ini

Recommended Posts

When I installed PHP I put the php.ini file on the C drive. When I make changes to that file, nothing happens When I run <?php phpinfo(); ?> to see the configuration, it says the php.ini file is in C:\Windows. Why would it say its there? Whats goin on? Only have the one on the C drive. Goin nuts here please advise. Thanks.

Share this post


Link to post
Share on other sites
PHP is probably using (or at least looking for) php.ini in C:\Windows.  It doesn't know that you wanted it to be in C:\ instead (if that's what you mean by "on the C drive").

I think the easiest solution is to check if there is a c:\Windows\php.ini, and if there is not, move your php.ini to there.  Then edit it and see if the changes show up.

Share this post


Link to post
Share on other sites
Moving it to C:\Windows was the first thing I tried to no avail. I searched the entire drive and that was the only php.ini file found. I deleted it for the heck of it and I can still get all the results when I run phpinfo().  ??? My computer must be posessed with the PHP demons. Maybe reinstall?

Share this post


Link to post
Share on other sites
Did you restart your web server after making the changes? This [b]HAS[/b] to be done for PHP to pick up the changes.

Ken

Share this post


Link to post
Share on other sites
Not sure what happened. I ended up reinstalling PHP and now it works. Thanks.

Share this post


Link to post
Share on other sites
PHP looks for the files needed in three places, the WINDOWS (or WINNT depending on the version of Windows you're using) folder, the System32 (WINDOWS/system32) folder or the Windows PATH variable.

It will not search the whole computer finding the files. If you want php to find your php.ini you''ll need to tell it where it is, either by adding a registery entry or by adding the following to Apaches conf file:
[code]PHPIniDir = "C:/"[/code]
The above only works for Apache2.0.x or higher.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.