PHP 4.0 Bug #2051: mysql_error() is not returning anything.

From: Date: Fri, 13 Aug 1999 23:56:57 +0000
Subject: PHP 4.0 Bug #2051: mysql_error() is not returning anything.
Groups: php.dev 
Request: Send a blank email to php-dev+get-9827@lists.php.net to get a copy of this message
From: joelg@naples.net Operating system: Linux 2.2.10 libc5 PHP version: 4.0 Beta 2 PHP Bug Type: MySQL related Bug 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; }

« previous php.dev (#9827) next »