Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"link to sever lost" with mysql.

Status
Not open for further replies.

BonesJunior

Programmer
Aug 4, 2000
2
0
0
SE
Hi, I get this message from time to time:
"link to server lost, unable to reconnect"

Is there a way to get rid of these problems?
I'm not sure if it's the PHP or MySQL side of the connection that fails me.

Any help is appreciated.

/Patrik
 
you should be able to supress error messages by using the @ sign before calling a function

ie:

@mysql_connect();

you can also vary the level of error reporting by PHP using

error_reporting(0);

although this won't help in the case of your mysql errors.

as a final check, make sure that the function that sets up your database connection doesn't have a custom error message specified in the mysql_connect function call.

the problem is this means that if you have problems in your scripts, they may be harder to trace with all the error supressing, so have a think about ways to compensate for that.

hope that helps

Andres Jugnarain
Wireless Editor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top