I recently installed Windows 7 on my laptop. I also configured IIS 7.5 on it, installed php 5.3.1 and MySQL 5.1.
Everything seemed to be installed correctly: I could see the IIS 7 Welcome screen, I could look at the php configuration with phpinfo() and I could see the MySQL tables using the MySQL Administrator GUI.
But when I tried to use phpMyAdmin, I got stuck: after trying to load the homepage of phpMyAdmin for 20-30 seconds, I got an HTTP Error 500. I searched the internet for hours, trying to find somebody with a similar experience, but I did not find any valuable resources.
Even a very simple test-script like
12345 <?phpecho "#1. Try to connect to mysql server...";mysql_connect("localhost", "username", "password") or die(mysql_error());echo "Connected to MySQL<br />";?>
generated a HTTP 500-error, after a 20-30 seconds wait.
Eventually, I decided to look at what I had installed when I was still using Vista. The difference seemed to be php: on my previous system, php 5.2.10 was installed.
I finally uninstalled MySQL and php 5.3.1, and then reinstalled php 5.2.11 and MySQL 5.1.41. That combination seemed to work without issues.
Conclusion: IIS 7.5 + php 5.3.1 + MySQL 5.1 does not seem to be a workable solution (for now). Stick to the 5.2-branch of php if you want to use it on Windows 7/IIS 7.5.

You are absolutely right … I spent the best part of a day banging my head against iis internal server error… thanks I just reinstalled the old 5.2.11
Just encountered the same issue. Please vote on the bug report at the PHP Bugs site to get it fixed in 5.3.2: http://bugs.php.net/bug.php?id=50290
B!
Im so glad I finally stumbled upon your blog! Ive just spent like 3 hours gradually getting more frustrated over this
Glad to know its not only me!
I have found out this bug is due to DNS resolution for localhost on Windows 7 (Server 2008 R2) based machines.
Uncomment 127.0.0.1 in your Hosts file! It fixes it
@Chris you sir, are the man! Great find.
thx a lot, you saved my day… or night:)
Already spent a night on this trying to reinstall php, mysql, playing with extensions, etc. to be clear, the HOSTS file is [typically] at “c:\windows\system32\drivers\etc\hosts”. you’ll need to open it in notepad with administrative privileges and remove the ‘#’ before the line 127.0.0.1 localhost. Thanks again chris for figuring this out!
You mean i’m not the only one?! I wish I stumbled onto this a few hours ago (>.<) If you edit the “c:\windows\system32\drivers\etc\hosts” file it fixes it. Thanks!!!!
Thanks for providing the clue to this problem.
MySQL 5.1.41 on Vista w/ IIS7.0
I upgraded PHP 5.2.something to 5.3.1 and MySQL access ground to a (near) halt.
My host file looked like this:
127.0.0.1 localhost
::1 localhost
I commented out the /second/ line and that fixed it for me.
No Problem to those that have thanked me, I found this information on the PHP site in the bug reports!
Wow…. I have to say after hours of USELESS information including but not limited to “edit the time zone in php.ini” I found the fix on your blog!
I did the same thing, Server 2008, however I commented out the ::1 entry, and everything works fine now. I was dreading having to backup/restore my blog, forums, and music server all to do a fresh install.
You are my favorite person of the day.
Ha wish I had googled this 3 hours ago but like others was being stubborn. I love you all and the tinterweb. Now back to some lavish php coding.
I went through the same process and the same frustration, but this post saved my day! Thank you, thank you!!!
So, so, so wish I’d read this a week ago. Would have saved me long nights and an angry wife…
Thumbs up, Chris!
Thanks Chris… was about to go home and be up all night thinking about it. Now I will get a good night sleep
Thank Goodness I came across this – I’ve spent the last 5 hours installing and uninstalling PHP, MySQL and setting permissions for IIS.
If anyone is googling for problems with installing Joomla with mySQL on Windows 7 or IIS 7.5 then this is it….
Ok, I have the same issue. Uncommented both lines in the hosts file but I am still getting the ERROR 500. Running MySQL 5.1.41 and php 5.2.14 installed using IIS web platform installer and the Fast CGI module.
I am going out of my mind as this is the only place I have been able to find something decent on the issue but the reported fixes here are not working for me. Do I need to get rid of the current install and start again?
Cheers