Upgrading php from 5.3.0 to 5.3.1 breaks connection to mySQL
Posted on 2011-10-20
I'm running WampServer on Windows 7 (x64) and everything has been working great. I'm setup with PHP 5.3.0 and MySQL 5.1.36
I've just added PHP 5.3.1 but when switching to this new version, I can no longer connect to MySQL using PHP. I've tried connecting with both mysql_connect and PDO.
My page tries to load and responds with "The Connection to the server was reset". Switching back to PHP 5.3.0 fixes the issue.
I've been searching for a resolution to this for a while and various topics point to a problem with localhost on windows 7, and suggest uncommenting the 127.0.0.1 localhost line in hosts or connecting to the sql server with 127.0.0.1 instead of localhost - I've tried all this and still don't get any joy.
Just can't pinpoint why it works with 5.3.0 but not 5.3.1
all the relevant extensions are loading fine in php (checked with phpinfo - mysql, pdo_mysql etc)
Baffled!! Any help appreciated