Edit report at https://bugs.php.net/bug.php?id=61380&edit=1
ID: 61380 User updated by: thephpguru at hotmail dot com Reported by: thephpguru at hotmail dot com Summary: XMLRPC Return Data Failure Status: Not a bug Type: Bug Package: XML related Operating System: Fedora 13 PHP Version: 5.3.10 Block user comment: N Private report: N New Comment: Dooooooooooooopppee. My complex script gets reduced to a simpler script. I will try it your way. Previous Comments: ------------------------------------------------------------------------ [2012-03-14 02:19:06] ahar...@php.net I don't really see how bug #46699 is related, besides being another xml_parse() bug -- it was a crasher related to namespace-aware parsers, and your issue involves neither crashing nor namespaces. The more I look at this, the less it looks like a bug in PHP. This script behaves as expected (outputting "Bare text content" and "<this is some CDATA>", without the "truncation" you reported separately in ##php: <?php $xml = <<<EOX <root> <element>Bare text content</element> <element><![CDATA[<this is some CDATA>]]></element> </root> EOX; function cdata_handler($parser, $data) { if (trim($data)) { // ignore whitespace var_dump($data); } } $parser = xml_parser_create(); xml_set_character_data_handler($parser, 'cdata_handler'); xml_parse($parser, $xml); ?> You should follow this up with a support channel, such as ##php or those listed at http://www.php.net/support.php, as this bug system is not a support forum. If you are able to reduce this to a self-contained, short example (such as that above) that shows a clear regression from PHP 5.2 to 5.3, please reopen this bug with that example. Thank you for your interest in PHP. ------------------------------------------------------------------------ [2012-03-14 02:00:47] thephpguru at hotmail dot com My problem is very similar to bug 46699. And that is what the MAKE_TEST file shows. https://freshsoftware.dyndns.info/~freshsoftware/scripts_for_sale/usps/make_test.txt ------------------------------------------------------------------------ [2012-03-14 01:57:58] thephpguru at hotmail dot com I can not make a complex script any shorter. In short the open_url function on line 100 connects to the USPS server. The startElement function on line 117 sets the array, and names the XML tree ID structure, The endElement function set the end of the tree info, and the CharacterDataHandler function captures the data between start and end functions. The xml_set_character_data_handler function is then used to read the data. But the data is getting turncated. ------------------------------------------------------------------------ [2012-03-14 01:47:04] ahar...@php.net I saw that. A (much) shorter, standalone reproduction script is required. ------------------------------------------------------------------------ [2012-03-14 01:44:21] thephpguru at hotmail dot com A sample code is: http://freshsoftware.dyndns.info/usps/usps_xml_carrier_pickup_live.phps ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=61380 -- Edit this bug report at https://bugs.php.net/bug.php?id=61380&edit=1