Re: mysql_connect() fails randomly
| From: | Jon Drukman | Date: | Tue, 19 Aug 2003 17:56:20 +0000 |
| Subject: | Re: mysql_connect() fails randomly | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160037@lists.php.net to get a copy of this message | ||
Curt Zirzow wrote:
* Thus wrote Jon Drukman (jsd@cluttered.com):i have warnings on. it says "Warning: mysql_connect() failed:" and then there is no error message. $php_errmsg is empty as well. it only happens once every hundred or so connects. it's starting to drive me bonkers. -jsd-$dbh=mysql_connect() or die("mysql connect failed: " . mysql_error());. Ensure your error_reporting level is high enought to allow Warnings, and make sure display_errors is on. or . Turn on track_errors and use the variable $php_errmsg inplace of mysql_error().die("mysql connecte failed: $php_errmsg");