Jump to content


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


php.ini file is in c:\winnt directory but no such directory exists!

Recommended Posts


When I run the phpinfo file on my website: http://www.neumanngroup.com/phpinfo.php it says my php configuration file is located in c:\winnt.  There is no winnt directory on the computer hosting my site.

I do my own hosting and I am running Windows XP.  When I search for any php.ini file on my machine, the results come back with only the php-dist and php-recommended files inside the /php directory.  I know that one of these files is not being used because when I can some parameters on these files and restart apache, the parameters are not reflected in the phpinfo file.  I am searching with all files showing, all hidden files showing, and all system files and directories showing.

How can PHP even run without a valid .ini file?  Where is this file?  I have restarted Apache and the computer.  All I am trying to do is change the max_upload size in my .ini file and that is it.

Any thoughts on where I might find my missing .ini file??  Even though my site works great and is using a ton of PHP files (like wordpress and gallery2).



Share this post

Link to post
Share on other sites
If php cannot find a php.ini file it'll use the defualt settings which is builtin to the intepreter. In order to get a php.ini file you'll want to rename php.ini-recommended to just php.ini. Now move php.ini to C:\windows (change C to the letter fo your hard drive).

Restart Apache and phpinfo should now reflect the changes you make to the php.ini

NOTE: If you are using Apache2.0.x or greater you can add the following:
[code]PHPIniDir "C:/WINDOWS/"[/code]
To the httpd.conf file.

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.