PHP 4.0 Bug #4613: track_errors & display_errors ignored

From: Date: Fri, 26 May 2000 13:15:42 +0000
Subject: PHP 4.0 Bug #4613: track_errors & display_errors ignored
Groups: php.dev 
Request: Send a blank email to php-dev+get-19501@lists.php.net to get a copy of this message
From: s.p.turvey@herts.ac.uk Operating system: Win2K + Apache PHP version: 4.0.0 Release PHP Bug Type: Scripting Engine problem Bug description: track_errors & display_errors ignored The following code does not work as expected: <? include ("std_header.php"); $dbConnection = mysql_connect ('localhost', 'webuser', 'somewrongpassword') or mysql_die ($php_errormsg); mysql_close ($dbConnection); include ("std_footer.php"); function mysql_die ($error) { echo "<TABLE WIDTH=\"50%\" BORDER=\"1\">"; echo "<TR><TD>"; echo "An error occured, please forward the details below to the "; echo "<A HREF=\"mailto:s.p.turvey@herts.ac.uk\">site administrator</A>"; echo " so that the fault may be rectified - thank you."; echo "</TD></TR>"; echo "<TR><TD>"; echo $error; echo "</TD></TR>"; echo "</TABLE>"; echo "<BR><A HREF=\"javascript:history.go(-1)\">Return to previous page</A>"; include ("std_footer.php"); exit; } ?> track_errors is On display_errors is Off I expected this to suppress the automatic display of errors from mysql_connect (it doesn't) and put the actual error message in $php_errormsg (it doesn't). While we're on the topic. mysql.errno and mysql.error functions also return nothing following error. This is with Win25, PHP4.0.0 Release, Apache 1.3.12, and MySQL 3.22.34

« previous php.dev (#19501) next »