| Anonymous | Login | Signup for a new account | 2013-05-21 09:50 BST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||
| 0000270 | Xdebug | Usage problems | public | 2007-05-21 10:15 | 2007-08-12 18:36 | |||
| Reporter | albert66 | |||||||
| Assigned To | derick | |||||||
| Priority | normal | Severity | crash | Reproducibility | always | |||
| Status | closed | Resolution | reopened | |||||
| Platform | OS | OS Version | ||||||
| Product Version | ||||||||
| Target Version | Fixed in Version | |||||||
| Summary | 0000270: Debugger aborts when PHP's eval() is encountered. | |||||||
| Description | The debugger exits when a script calls PHP's eval(). Example: <?php print "hello"; eval("print 'to';"); print "you"; ?> When execution point passes at the second line, the debugger aborts. | |||||||
| Additional Information | Tried this with both 2.0.0rc3 and 2.0.0rc4. Background: I'm using xdebug to debug my Drupal applications. Drupal is one of the leading open source CMSs. Some Drupal components allow the administrator to put PHP code to be eval()uated in some useful places. The inability to debug a Drupal installation that contain such PHP snippets makes it hard to debug Drupal. | |||||||
| Tags | No tags attached. | |||||||
| Operating System | Linux (Fedora Core 4) | |||||||
| PHP Version | 5.0.4 | |||||||
| Attached Files | ||||||||
Notes |
|
|
(0000621) albert66 (reporter) 2007-05-21 15:16 |
BTW, for the "severity" field of this report I've chosen "crash". I now believe "crash" means: a crash of the http server or of PHP. No, that's not what happens. Sorry for misleading you. It doesn't crash. The debugger aborts but I can restart another debugging session without a problem. It's just that the debugging session terminates on an eval() call. |
|
(0000627) derick (administrator) 2007-05-22 22:59 |
I can not reproduce this with the bundled client: Waiting for debug server to connect. Connect <?xml version="1.0" encoding="iso-8859-1"?> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] fileuri="file:///home/httpd/html/test/xdebug/bug270.php" [^] language="PHP" protocol_version="1.0" appid="16229" idekey="dr"><engine version="2.0.0RC4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org [^]]]></url><copyright><![CDATA[Copyright (c) 2002-2007 by Derick Rethans]]></copyright></init> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/home/httpd/html/test/xdebug/bug270.php" lineno="2"></xdebug:message></response> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/home/httpd/html/test/xdebug/bug270.php" lineno="3"></xdebug:message></response> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/home/httpd/html/test/xdebug/bug270.php(3) : eval()'d code" lineno="1"></xdebug:message></response> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/home/httpd/html/test/xdebug/bug270.php" lineno="4"></xdebug:message></response> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/home/httpd/html/test/xdebug/bug270.php" lineno="6"></xdebug:message></response> (cmd) step_into -i 1 <?xml version="1.0" encoding="iso-8859-1"?> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="stopped" reason="ok"></response> |
|
(0000628) albert66 (reporter) 2007-05-24 09:28 |
I want to add a "bugnote". Then I'll close the bug. |
|
(0000629) albert66 (reporter) 2007-05-24 09:29 |
I see. So it has to do with something with my setup. I'll upgrade my PHP to the latest version I can. Thank you for your reply, Derick. > > I can not reproduce this with the bundled client: (It has nothing to do with the client, BTW. I'm using Vim's plugin and it fails too.) BTW2, I've found the following two reports, but they contain no clues: http://issues.waterproof.fr/IssueView.php?Id=11067&activeItem=91 [^] http://support.activestate.com/forum-topic/error-while-debugging-eva [^] |
|
(0000630) albert66 (reporter) 2007-05-24 09:31 |
(Hmmm... I don't know how to close the bug, sorry :-) |
|
(0000631) derick (administrator) 2007-05-26 21:56 |
Could you try the latest CVS version perhaps? I committed a change to the eval() handling code, as there was indeed something strange going on there. |
|
(0000640) albert66 (reporter) 2007-05-29 17:22 |
> > Could you try the latest CVS version perhaps? > I've just tried. I get the same results. An 'eval()' call stops the debugger. (BTW, when I tried to compile this CVS version I got an error: xdebug.c:2199: error: 'struct _php_core_globals' has no member named 'last_error_type' I commented out this line and was able to proceed with the compilation.) |
|
(0000644) derick (administrator) 2007-05-30 19:35 |
I fixed the compile error in CVS, but I can still not reproduce your error, not even with PHP 5.0.4. Could you please make a remote debug log? (See http://xdebug.org/docs/all_settings#remote_log [^] on how to do that) |
|
(0000646) albert66 (reporter) 2007-06-01 03:49 |
Derick, thanks. I used the following test script: <?php print "111\n"; eval('print "222\n";'); print "333\n"; print "444\n"; print "555\n"; print "666\n"; ?> And got the following recording: ====================================== Log opened at 2007-06-01 01:34:08 -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] fileuri="file:///var/www/html/test.php" [^] language="PHP" protocol_version="1.0" appid="2336"><engine version="2.0.0RC5-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org [^]]]></url><copyright><![CDATA[Copyright (c) 2002-2007 by Derick Rethans]]></copyright></init> <- step_into -i 1 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/var/www/html/test.php" lineno="2"></xdebug:message></response> <- step_into -i 1 -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="step_into" transaction_id="1" status="break" reason="ok"><xdebug:message filename="/var/www/html/test.php" lineno="3"></xdebug:message></response> <- step_into -i 1 ====================================== The last line, "step_into -i 1", was the command I issued when the debugger was on line 0000003 (the line containing the eval() call). I get nothing in response. The debugger front-end tells me the connection was closed/disconnected. Important: after this point the script continues to run normaly. I see "111 222 333 444 555 666" in my browser. |
|
(0000647) albert66 (reporter) 2007-06-01 03:56 |
BTW, what would happen if I used the 'dbg' or 'php3' protocols instead of 'dbgp'? Could it make any difference? Would it help you if you knew the results? (I'm not sure I have a debugger front-end to either of these two protocols.) |
|
(0000648) derick (administrator) 2007-06-01 14:24 |
I think I just fixed this in CVS. Feel free to reopen if the problem re-appears. |
|
(0000715) nukem (reporter) 2007-08-12 18:36 |
Reminder sent to derick I also experience the segmentation fault if using the command line php running a script with eval() and xdebug shutting down when doing remote debug. Same output as albert66 PHP version 4.3.9 I modified my xdebug.c to include my PHP version and the problem went away. I hope this helps. I have also added notes on the bug report. 1048 #if (PHP_MAJOR_VERSION == 6) || \ 1049 (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 1) || \ 1050 (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION == 0 && PHP_RELEASE_VERSION > 3) || \ 1051 (PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 4 && PHP_RELEASE_VERSION > 0) || \ 1052 (PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION > 0) 1053 if (tmp->function.type == XFUNC_EVAL) { 1054 int is_var; |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2007-05-21 10:15 | albert66 | New Issue | |
| 2007-05-21 15:16 | albert66 | Note Added: 0000621 | |
| 2007-05-22 22:59 | derick | Status | new => resolved |
| 2007-05-22 22:59 | derick | Resolution | open => unable to reproduce |
| 2007-05-22 22:59 | derick | Assigned To | => derick |
| 2007-05-22 22:59 | derick | Note Added: 0000627 | |
| 2007-05-24 09:28 | albert66 | Status | resolved => feedback |
| 2007-05-24 09:28 | albert66 | Resolution | unable to reproduce => reopened |
| 2007-05-24 09:28 | albert66 | Note Added: 0000628 | |
| 2007-05-24 09:29 | albert66 | Note Added: 0000629 | |
| 2007-05-24 09:31 | albert66 | Note Added: 0000630 | |
| 2007-05-26 21:56 | derick | Note Added: 0000631 | |
| 2007-05-29 17:22 | albert66 | Note Added: 0000640 | |
| 2007-05-30 19:35 | derick | Note Added: 0000644 | |
| 2007-06-01 03:49 | albert66 | Note Added: 0000646 | |
| 2007-06-01 03:56 | albert66 | Note Added: 0000647 | |
| 2007-06-01 14:24 | derick | Status | feedback => closed |
| 2007-06-01 14:24 | derick | Note Added: 0000648 | |
| 2007-08-12 18:36 | nukem | Note Added: 0000715 | |
| Copyright © 2000 - 2011 MantisBT Group |