From: ldemailly at qualys dot com
Operating system: Linux 2.4.20
PHP version: 4CVS-2003-05-13 (stable)
PHP Bug Type: Scripting Engine problem
Bug description: set_error_handler registered not called
set_error_handler registered not called:
very nasty/triky bug to nail/reproduce:
I'm now at the point where if I try to minimize
further the test scripts, the bug goes away:
for instance, removing the "require q.inc" where
q.inc is an empty file, or changing code that
is *after* the offending code makes the bug go
away (hides it), so I suspect some nasty problem
in the engine, because it seems memory usage and/or
complexity of the script to be parsed affects the outcome.
to repro: copy paste, uudecode; gtar xvfz test_err.tgz
cd test_err; php ErrorBug.php
it will output "INSIDE test_should_error_out()"
but not "ERROR HANDLER CALLED" as it should if
you look at PHPUnit/TestCase.php line 158 and 147
the error is raised (as the Notice: Undefined variable: foo in
/home/dl/dev/cvs/qualys/web/dev/current/internal/test_err/ErrorBug.php on
line 7 demonstrates) but the handler is not called...
if you edit BugTest1.php to remove the require 'q.inc' for
instance, you will now see "ERROR HANDLER CALLED"
even though q.inc is empty and should thus make no difference at all !
ps: the code has been modified from pear's phpunit module with a submitted
patch for error handling; which works 'sometimes' (most of the time
actually). in the tgz below, I removed a lot of stuff to make the files as
small as possible... (incl headers/copyright notices, etc...))
I spent many many hours trying to narrow it down further
(having a simpler script) but didn't manage, sorry for
having a large set of files needed ...
This is with the latest cvs (2003-05-13) on redhat linux 9
next message will be the .uu, if you're having any
trouble, please email and I'll (re)send the repro scripts
--
Edit bug report at http://bugs.php.net/?id=23619&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=23619&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=23619&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=23619&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=23619&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=23619&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=23619&r=support
Expected behavior: http://bugs.php.net/fix.php?id=23619&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=23619&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=23619&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=23619&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23619&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=23619&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=23619&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=23619&r=gnused