MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000445XdebugUsage problems (Wrong Results)public2009-06-16 04:112009-07-05 23:20
Reporterkent 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.0.0dev 
Target VersionFixed in Version 
Summary0000445: error_prepend_string and error_append_string are ignored by xdebug_error_cb
Descriptionxdebug_error_cb does not output PHP ini settings error_prepend_string, or error_append_string
Additional InformationOn our developement systems, we use a specially crafted error_prepend_string and error_append_string to both highlight errors on scripts, but also as a means of automated testing using Selenium. When a specific error string is output on a web page, we can automatically detect the error on PHP pages.

Since we have recently switched to Xdebug and Netbeans, the errors were not being detected, and after investigation it turns out the Xdebug was the culprit.

The fix is simple. The following patch can be applied to xdebug.c version 2.0.4:

1812a1813,1814
> char * prepend_string;
> char * append_string;
1820c1822,1823
< xdebug_str_add(&str, formats[0], 0);
---
> prepend_string = INI_STR("error_prepend_string");
> append_string = INI_STR("error_append_string");
1821a1825,1826
> xdebug_str_add(&str, prepend_string ? prepend_string : "", 0);
> xdebug_str_add(&str, formats[0], 0);
1953a1959
> xdebug_str_add(&str, append_string ? append_string : "", 0);

It mostly patches the get_printable_stack function.

Thanks for a great tool!

TagsNo tags attached.
Operating SystemFreeBSD 7.2 RELEASE
PHP Version5.2.8
Attached Files

- Relationships

-  Notes
(0000967)
derick (administrator)
2009-06-21 01:18

Could you please attach the patch (please make with diff -u) as file to this report?
(0000969)
kent (reporter)
2009-06-22 02:38
edited on: 2009-06-22 02:41

I don't have permission to upload, I think... Can you grant me permission first?

(0000979)
derick (administrator)
2009-07-05 23:20

Fixed in CVS (for Xdebug 2.1 only) and thanks for the patch!

- Issue History
Date Modified Username Field Change
2009-06-16 04:11 kent New Issue
2009-06-16 04:11 kent Operating System => FreeBSD 7.2 RELEASE
2009-06-16 04:11 kent PHP Version => 5.2.8
2009-06-16 04:11 kent Xdebug Version => 2.0.4-dev
2009-06-21 01:18 derick Note Added: 0000967
2009-06-21 01:18 derick Status new => feedback
2009-06-22 02:38 kent Note Added: 0000969
2009-06-22 02:41 kent Note Edited: 0000969
2009-07-05 23:20 derick Note Added: 0000979
2009-07-05 23:20 derick Status feedback => closed
2009-07-05 23:20 derick Resolution open => fixed
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker