I am using Apache 2.2/PHP 5.3.3/MySql 5.1 to do web site development on my local PC. Previously I had installed this combination on a Windows XP machine. I recently bought a new PC with Windows 7 on it. I’ve downloaded and installed the above packages and have configured them. Apache works. PHP works. MySql works. What doesn’t work, however: PHP is not finding the php.ini file.
When I run phpinfo(), it tells me:
– Configuration File (php.ini) Path - C:\Windows
– Loaded Configuration File - (none)
Of course, my php.ini file is in C:\PHP, NOT in C:\Windows. I’ve been tearing my hair out for several hours over this and have so far set up or verified the following:
– My PATH system environment variable contains both C:\PHP\ and C:\PHP\ext
– My PHPRC system environment variable contains C:\PHP
– My Apache httpd.conf file contains the following lines:
LoadModule php5_module “C:/PHP/php5apache2_2.dll”
– I have set up a registry key HKEY_LOCAL_MACHINE\SOFTWARE\PHP\5.3\IniFilePath = C:\PHP\
And yes, I’ve restarted Apache or rebooted the PC multiple times in conjunction with making sure all this was correct I’m a bit unsure if there might be other registry keys that could help. However, so far NOTHING has worked. PHP stubbornly refuses to look anywhere but C:\Windows for the php.ini file. Moreover, even if I copy it into that location, it STILL doesn’t load anything.
I’m at a loss. I suppose there could be something with Win7 security going on. Any ideas you might offer would be greatly appreciated. Thanks!