Page 1 of 1

Php.ini path

PostPosted: 03. October 2008 13:52
by Tiddo
When I run phpinfo(), it says the Configuration File (php.ini) Path is C:\WINDOWS. I want it to be C:\xampp\apache\bin\php.ini. I've tried everything, i've set a PHPRC variable, i've added PHPIniDir = "C:\xampp\apache\bin" in my httpd.conf file and i've eve added some registery entries, but it doesn't work at all. Can anyone help me?



ps. sorry for my bad English

PostPosted: 03. October 2008 14:06
by Sharley
Try editing your environment variables here:
Control Panel>System>Advanced>Environment Variable>User variable or System variables

It is easier to copy and paste a long line into your text editor - edit the line - copy and paste back into the line. This way you will also be making a backup.

Look for the errant Windows entry and delete or edit to reflect the path you want also delete the Windows php.ini file if it exists.

Not sure if a reboot will be required but you can sort that out.

Good luck,

PostPosted: 03. October 2008 14:21
by Tiddo
Didn't work, I set the PHPRC variable in the user and in the system variables, but phpinfo still says my php.ini path is C:\windows.
I don't have any php.ini file in that directory so the loaded config file is in an other directory. but i still want to change the php.ini path

PostPosted: 03. October 2008 14:30
by Sharley
Do you have or have you had another instance of php other than the one included with XAMPP?

PostPosted: 03. October 2008 14:32
by Tiddo

PostPosted: 03. October 2008 15:12
by Sharley
Just to recap:
You started the Apache server and went to the URI http://localhost/ and clicked on the link phpinfo() in the left menu frame of the Welcome Page...

...or you started Apache and went to the URI http://localhost/xampp/phpinfo.php

The 2 entries I see in my phpinfo file doing the above on my XAMPP installation Apache server are:

Configuration File (php.ini) Path C:\WINDOWS

Loaded Configuration File C:\xampp\apache\bin\php.ini

The only one you should be concerned about is the Loaded Configuration File as that is the one that XAMPP uses for the php settings.