Author Topic: bugfix: "the connection was reset" (php 5.3)  (Read 6953 times)

amac44

  • Guest
bugfix: "the connection was reset" (php 5.3)
« on: October 29, 2010, 06:04:44 AM »
This may be noted elsewhere but in case not, I was trying to do any install on localhost using WAMP (php version=5.3) and was getting:

"the connection was reset"

Discovered on the wampserver forum that PHP 5.3 apparently requires a link in mysql_close() ... there's a comment about this on http://php.net/mysql_close

I edited install/save.php and changed line 347
< if(!@mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD)) {
> if(!$db_handle =@mysql_connect(DB_HOST, DB_USERNAME, DB_PASSWORD)) {

and line 355
< mysql_close();
> mysql_close($db_handle);

Once I did this, the error did not occur anymore and the install completed successfully.

This ought to be backwards compatible.

p.s.

I googled for "website baker" and the error message, which turned up one German post that didn't appear to offer a solution.

Found an English thread here (http://www.websitebaker2.org/forum/index.php/topic,18856.0.html) that mentions this, but the poster was just told to try XAMP, which is cool, but if you're like me and you have several sites already on your WAMP that's not ideal.


 

postern-length