The following bug has been CLOSED
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000133
======================================================================
Reporter: kumar303
Handler:
======================================================================
Project: Xdebug
Bug ID: 133
Category: Debug client (console)
Reproducibility: always
Severity: block
Priority: normal
Status: closed
Operating System: Linux 2.4.18-1-686
PHP Version: 5.0.4
Xdebug Version: 2.0.0beta2
======================================================================
Date Submitted: 2005-07-21 19:08 CEST
Last Modified: 2005-08-10 19:10 CEST
======================================================================
Summary: PHP scripts exits 0 with xdebug (backtrace enabled) on PHP error
Description:
Xdebug 2.0 beta 2
a PHP program will exit 0 when any error occurs and xdebug backtrace is
enabled (bug). If I set xdebug.default_enable=0 in ini or
xdebug_disable() PHP exits as it should do on error (usually 127 I think).
This is a major block for me because I have a test suite that runs scripts
with the PHP binary and determines pass/fail from their exit status. And I
would like to see the backtraces from my test suite! thanks for working on
this much needed extension.
======================================================================
----------------------------------------------------------------------
derick - 2005-08-06 18:08 CEST
----------------------------------------------------------------------
Do you have a short reproducing script, the following works fine here:
derick[@]kossu:~$ cat /tmp/foo.php
<?php
exit(56);
derick[@]kossu:~$ php-4.4dev /tmp/foo.php ; echo $?
56
----------------------------------------------------------------------
kumar303 - 2005-08-09 23:22 CEST
----------------------------------------------------------------------
sorry for delayed response ...
Yes, I can still reproduce it. Looks like your test did not produce an
error first. Try a fatal error, like this:
$ php -r "call_to_undefined_fn();"
$ echo $?
I get 0 [the bug]
then, if I add :
$ php -r "xdebug_disable(); call_to_undefined_fn();"
$ echo $?
I get 255, as expected.
My environment is the same as when I first posted the bug. Let me know if
you need anything else. thanks, K
----------------------------------------------------------------------
derick - 2005-08-10 19:10 CEST
----------------------------------------------------------------------
Fixed in CVS.
Bug History
Date Modified Username Field Change
======================================================================
2005-07-21 19:08kumar303 New Bug
2005-07-21 19:08kumar303 Bug Monitored: kumar303
2005-08-06 18:08derick Bugnote Added: 0000276
2005-08-09 23:22kumar303 Bugnote Added: 0000278
2005-08-10 19:10derick Bugnote Added: 0000279
2005-08-10 19:10derick Status new => closed
======================================================================
Received on Wed Aug 10 2005 - 19:10:23 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST