php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22966 no error reporting
Submitted: 2003-03-30 14:50 UTC Modified: 2003-03-31 01:30 UTC
From: phresno at concept-factory dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.1 OS: Linux 2.4.20, NetBSD 1.6.1_RC2
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: phresno at concept-factory dot com
New email:
PHP Version: OS:

 

 [2003-03-30 14:50 UTC] phresno at concept-factory dot com
After trying to use set_error_handler() with my own handler, I now recieve no error reporting on any script, regardless of using set_error_handler() or not.

Example:
<?php
error_reporting(E_ALL);
define("STUFF", 1);
if (true)
{
define("STUFF", 2);
?>

Would normally generate messages about trying to redefine STUFF, and not closing the IF statement; however, I now recieve no error/warnring/notice messages at all from PHP.

This happened after trying to use set_erro_handler() in a a different script example:

<?php
function my_handler($_errno, $_errstr, $_errfile, $_errline)
{
   printf("%i - %s in %s on line %i",
          $_errno,
          $_errstr,
          $_errfile,
          $_errline);

   return true;
}

set_error_handler("my_handler");

trigger_error("Just something in general", E_USER_ERROR);
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-30 15:02 UTC] phresno at concept-factory dot com
I also tested this with PHP 4.2.3 on a NetBSD system. I've gotten the same resultes, even when using ini_set("display_errors", "1"); and ini_set("html_errors", "1"); along with error_reporting(E_ALL);
 [2003-03-30 15:36 UTC] phresno at concept-factory dot com
Seems to have been my mistake in what I was expecting PHP to report. I still get scripts that die without reporting errors at all such as with leaving off a ;, or not closing a { with }, however, I recieve warnings for incorrect argument counts to functions.
 [2003-03-31 01:30 UTC] sniper@php.net
Can not reproduce.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Dec 07 09:00:02 2025 UTC