On Thu, 21 Aug 2003 18:18:37 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
that is true, but in this case, neither $php_errmsg nor mysql_error()
return anything. i print them both out when the connect fails and they
are both just blank.
try to use error_reporting(E_ALL); and to see what
Antony Dovgal wrote:
try to use error_reporting(E_ALL); and to see what happends.
maybe error logging will help you to solve your trouble.
I don't beleive in such bugs, it's a problem of your code imho.
here's my code:
mysql_connect() or die(mysql connect failed: $php_errmsg / .
mysql_error());
Jon Drukman unknowingly asked us:
Antony Dovgal wrote:
try to use error_reporting(E_ALL); and to see what happends.
maybe error logging will help you to solve your trouble.
I don't beleive in such bugs, it's a problem of your code imho.
here's my code:
mysql_connect() or die(mysql connect
Antony Dovgal wrote:
On Tue, 19 Aug 2003 14:36:15 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
Approximately 1% of the time it just fails, for no stated reason:
Warning: mysql_connect() [http://www.php.net/function.mysql-connect]:
in /var/httpd/htdocs/pi/pi.php on line 3
mysql connect failed:
On Wed, 20 Aug 2003 21:31:48 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
mysql_error is not set when mysql_connect fails, because there is no
actual mysql resource to get the error message from.
yes, there is no mysql resource at this moment.
just don't specify it and mysql_error() will tell
If you reach to maximum mysql connection limit or link limit, mysql_connect will fail.
Check limits and current fullness.
---Original Message---
From: Jon Drukman
Date: 21 Austos 2003 Perembe 11:32:47
To: [EMAIL PROTECTED]
Subject: Re: PHP mysql_connect randomly failing
Antony
Antony Dovgal wrote:
mysql_error is not set when mysql_connect fails, because there is no
actual mysql resource to get the error message from.
yes, there is no mysql resource at this moment.
just don't specify it and mysql_error() will tell something like Can't connect to local
MySQL server
funny i was just having the same problemo with mysql 3.22 on php3 the most painful
system to debug i hate it to bits, anyway mysql_error doesnt get returned on
permission or database connection errors, i wonder if that is soughted out in mysql4
?? maybe this is a php.net question
Jon Drukman
On Tue, 19 Aug 2003 14:36:15 -0700
Jon Drukman [EMAIL PROTECTED] wrote:
I've got a library of PHP code whose first line is a mysql_connect
statement, like this:
$dbh=mysql_connect() or die(mysql connect failed: $php_errmsg);
Approximately 1% of the time it just fails, for no stated
Are you connecting through a TCP or a UNIX domain socket?
--Michael
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman
Sent: Tuesday, August 19, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: PHP mysql_connect randomly failing
I've got a library of
unix domain.
Michael S. Fischer wrote:
Are you connecting through a TCP or a UNIX domain socket?
--Michael
-Original Message-
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jon Drukman
Sent: Tuesday, August 19, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: PHP mysql_connect randomly
11 matches
Mail list logo