Bug #61380 [Opn->Nab]: XMLRPC Return Data Failure
| From: | aharvey@php.net | Date: | Wed, 14 Mar 2012 02:19:06 +0000 |
| Subject: | Bug #61380 [Opn->Nab]: XMLRPC Return Data Failure | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168437@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61380&edit=1
ID: 61380
Updated by: aharvey@php.net
Reported by: thephpguru at hotmail dot com
Summary: XMLRPC Return Data Failure
-Status: Open
+Status: Not a bug
Type: Bug
-Package: XMLRPC-EPI related
+Package: XML related
Operating System: Fedora 13
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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] aharvey@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
------------------------------------------------------------------------
[2012-03-14 01:23:16] aharvey@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
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