Jump to content


Photo

php.ini


  • Please log in to reply
5 replies to this topic

#1 speals

speals
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 October 2006 - 02:32 AM

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.


#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 10 October 2006 - 03:49 AM

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.

#3 speals

speals
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 October 2006 - 04:14 AM

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?

#4 kenrbnsn

kenrbnsn
  • Staff Alumni
  • Advanced Member
  • 8,235 posts
  • LocationHillsborough, NJ, USA

Posted 10 October 2006 - 04:45 AM

Did you restart your web server after making the changes? This HAS to be done for PHP to pick up the changes.

Ken

#5 speals

speals
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 10 October 2006 - 04:52 AM

Not sure what happened. I ended up reinstalling PHP and now it works. Thanks.

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 10 October 2006 - 10:38 AM

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:
PHPIniDir = "C:/"
The above only works for Apache2.0.x or higher.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users