|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-05-30 11:33 UTC] s dot p dot turvey at herts dot ac dot uk
[2000-06-01 13:52 UTC] s dot p dot turvey at herts dot ac dot uk
[2000-06-02 13:20 UTC] s dot p dot turvey at herts dot ac dot uk
[2000-07-25 21:34 UTC] brad@php.net
[2000-07-25 23:57 UTC] s dot p dot turvey at herts dot ac dot uk
[2000-07-26 00:26 UTC] waldschrott@php.net
[2000-08-18 13:17 UTC] waldschrott@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 02:00:02 2025 UTC |
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