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
https://forums.phpfreaks.com/topic/23495-phpini/
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
https://forums.phpfreaks.com/topic/23495-phpini/#findComment-106612
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
https://forums.phpfreaks.com/topic/23495-phpini/#findComment-106616
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
https://forums.phpfreaks.com/topic/23495-phpini/#findComment-106725
Share on other sites

Archived

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

×
×
  • 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.