Posts Tagged ‘PHP php.ini XP IIS path phpinfo mysql’

Path to php.ini is incorrect in phpinfo() on Windows

January 28th, 2009 No comments

I just did a manual install of php on a windows xp box using IIS and no mysql server.  The mysql server is on another box.  However, in order to get my scripts to work with the mysql server, I need to load the php_mysql extension within the php.ini file.

I was able to get PHP running correctly (the file-level permissions are really picky if your running into trouble) but I  noticed from phpinfo() that the mysql extension was not showing up and that path to php.ini was not correct.

By default PHP recommends placing the php.ini file in the same directory as the other php files, usually something like c:\php.  However, even when the windows system path variable is setup and the machine rebooted, php is not looking for its own .ini file.

The resolution is to place the php.ini file in the C:\windows directory and restart the web service.  Apparently php is compiled with the windows directory as default and doesn’t want to change the path.