PHP is looking for php.ini file in c:\windows

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Son Volt
Forum Newbie
Posts: 19
Joined: Tue Jul 11, 2006 1:36 pm

PHP is looking for php.ini file in c:\windows

Post by Son Volt »

As the installation txt suggests, I have left my php.ini file inside the c:\php directory... but running phpinfo() shows that my php.ini file is in c:\windows as shown below.

Configuration File (php.ini path) - C:\WINDOWS

Well there is no php.ini file in my windows directory, so I'm not sure where it's getting it's configuration settings from... unless I suppose they're built into the executable somewhere if no php.ini file is found. My questions is - why php is not locating my php.ini file that is located in the c:\php directory? I'd rather not move it to the windows directory so I can keep everything nice and tidy like the installation file suggests.

Any thoughts?

thanks
bdlang
Forum Contributor
Posts: 395
Joined: Tue May 16, 2006 8:46 pm
Location: Ventura, CA US

Post by bdlang »

Did you add C:\php to your PATH variable? I know the previous recommendations for Windows installs used to have you copy this file over to C:\Windows, that file to C:\Windows\System32, etc. The current method recommends simply setting the PATH variable with the C:\php directory, and everything should work fine. I have used this method with success on three Win machines. Obviously make sure C:\php\php.ini exists and is properly edited for your specific configuration.

[ edit ] I meant to say setting the PATH variable with the C:\php directory, my bad.
Last edited by bdlang on Tue Jul 11, 2006 1:53 pm, edited 1 time in total.
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

bdlang wrote:I know the previous recommendations for Windows installs used to have you copy this file over to C:\Windows
Yes I remember that too.
Son Volt
Forum Newbie
Posts: 19
Joined: Tue Jul 11, 2006 1:36 pm

Post by Son Volt »

This is a brand new laptop I'm installing PHP on so there is (I just double checked) no PHP.ini file in the c:\windows directory. The path is set to include c:\php... and opening a DOS prompt and typing "php" is a recognizable command regardless of my current directory. This is the 2nd machine I have had this same problem with. I'm still confused...
tengue17
Forum Newbie
Posts: 8
Joined: Tue Jul 11, 2006 1:16 am

i'm not sure,

Post by tengue17 »

maybe not the case, but do you put "hide hidden file and folder" in folder option?
Post Reply