Page 1 of 1

php.ini location

Posted: Thu Mar 30, 2006 12:12 pm
by MarK (CZ)
This may be a common problem but I was unable to find any solution to this neither here or by google.

My Apache2 is working well, PHP scripts work also. But the problem is that phpinfo() says that 'php.ini' file is located in the "C:\Windows" directory. Obviously, it is not there. I have tried putting it both in the Apache directory and php directory, even in the windows directory but no change. I went through the documentation but I still cannot find the solution.

Thanks for help ;)

(Apache/2.0.55 (Win32) PHP/5.1.1)

Posted: Thu Mar 30, 2006 12:16 pm
by feyd
With Apache 2, you can specify where you want it to load your ini from.

Code: Select all

PHPIniDir "C:\PHP"
This goes in httpd.conf after the loading of the module. Remember to restart Apache. ;)

Posted: Thu Mar 30, 2006 12:25 pm
by MarK (CZ)
Yeah, I just found it out minutes before you wrote it.. This wasn't necessary in any of my previous installs :(

Thanks