php.ini location

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

php.ini location

Post 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)
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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. ;)
User avatar
MarK (CZ)
Forum Contributor
Posts: 239
Joined: Tue Apr 13, 2004 12:51 am
Location: Prague (CZ) / Vienna (A)
Contact:

Post 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
Post Reply