Re: PHP 4.0 Bug #2051: mysql_error() is not returning anything.
| From: | Zeev Suraski | Date: | Sat, 14 Aug 1999 01:07:35 +0000 |
| Subject: | Re: PHP 4.0 Bug #2051: mysql_error() is not returning anything. | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-9828@lists.php.net to get a copy of this message | ||
mysql_error() does not report errors in failed connects, and never has.
Can you check whether other errors (e.g. query errors) work fine for you?
Zeev
At 01:56 14/08/99 , joelg@naples.net wrote:
-- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.ilFrom: joelg@naples.netOperating system: Linux 2.2.10 libc5PHP version: 4.0 Beta 2 PHP Bug Type: MySQL relatedBug description: mysql_error() is not returning anything. In php3 I was able to call the mysql_error() whenever there was a mysql specific error (IE: If the script was not able to conect to the server it would display info about it), but it seems everytime the mysql_error() function is called under php4b2 it simply returns a NULL string. I've tested it under conditions where the mysql server is down, and the page displays the warning message cgenerated by php3's warning facility, but if I try to echo mysql_error() I retrieve nothing back. Could anyone tell me why this is, and if it's a big could you please notify me so I can be sure it's not just some stupid mistake on my part :) ************* MODULES COMPILED IN ************ mysql gd1.3 zlib ttf ************ SHORT SCRIPT ***************** $conn = mysql_connect("localhost","user","pass); // Server that is currently down. if(!$conn) {echo mysql_error(); exit;} -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net