Jump to content

php.ini


speals

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.
Link to comment
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.
Link to comment
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?
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.