php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4613 track_errors & display_errors ignored
Submitted: 2000-05-26 15:15 UTC Modified: 2000-08-18 13:18 UTC
From: s dot p dot turvey at herts dot ac dot uk Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.0 Release OS: Win2K + Apache
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: s dot p dot turvey at herts dot ac dot uk
New email:
PHP Version: OS:

 

 [2000-05-26 15:15 UTC] s dot p dot turvey at herts dot ac dot uk
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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-30 11:33 UTC] s dot p dot turvey at herts dot ac dot uk
Sorry, last line should have read:

This is with Win2K, PHP4.0.0 Release, Apache 1.3.12, and MySQL 3.22.34



 [2000-06-01 13:52 UTC] s dot p dot turvey at herts dot ac dot uk
Juat a thought.  Is this because I'm running as a CGI rather than a module?
 [2000-06-02 13:20 UTC] s dot p dot turvey at herts dot ac dot uk
Problem has been resolved by using PHP4 as a module.  track_errors and display_error still ignored when using the CGI exe.
 [2000-07-25 21:34 UTC] brad@php.net
You can't run PHP4 as a module on Windows. How are running it?
 [2000-07-25 23:57 UTC] s dot p dot turvey at herts dot ac dot uk
Someone compiled the module for me under VC and I installed it according to the instructions for module users.  No problems at all.  The machine it was on is currently out of commission (damn Intel MB recall) so it'll be about 4 weeks before I can demonstrate this to you.
 [2000-07-26 00:26 UTC] waldschrott@php.net
I?d propose that you should wait for php4.0.2. There are rumors including a module into the distr.
Anyway, php4 works fine as a module built out of php.4.0.1pl2 (I?m using it too, partially)

have you tried using error_reporting()

 [2000-08-18 13:17 UTC] waldschrott@php.net
Closed due to missing user feedback.
also try out binaries/apachemod from www.php4win.de
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Sep 28 21:01:26 2024 UTC