ID:               32087
 Updated by:       [EMAIL PROTECTED]
 Reported By:      kellan at pobox dot com
-Status:           Verified
+Status:           Feedback
 Bug Type:         XML related
 Operating System: any (tested on os x and debian)
 PHP Version:      5.0.3
 New Comment:

Hello,

Please try with libxml2-2.6.17 or cvs snapshot. It works well here
using both of them.

--Pierre


Previous Comments:
------------------------------------------------------------------------

[2005-02-25 11:15:10] [EMAIL PROTECTED]

Verified on Linux with libxml-2.6.16.
Seems like a libxml bug to me.

Program received signal SIGINT, Interrupt.
[Switching to Thread 1089708384 (LWP 21170)]
0x40e53223 in xmlParseTryOrFinish (ctxt=0x85ac1b0, terminate=1) at
parser.c:9038
9038    parser.c: No such file or directory.
        in parser.c
(gdb) bt
#0  0x40e53223 in xmlParseTryOrFinish (ctxt=0x85ac1b0, terminate=1) at
parser.c:9038
#1  0x40e5488f in xmlParseChunk__internal_alias (ctxt=0x85ac1b0,
chunk=0x8593aec "<greeting>hello world</greeting>", size=140145336,
terminate=1) at parser.c:9872
#2  0x08237ca7 in php_XML_Parse (parser=0x85ac164, data=0x8593aec
"<greeting>hello world</greeting>", data_len=32, is_final=1) at
/usr/src/dev/php-src/ext/xml/compat.c:481
#3  0x082361ac in zif_xml_parse (ht=3, return_value=0x85ad1bc,
this_ptr=0x0, return_value_used=1) at
/usr/src/dev/php-src/ext/xml/xml.c:1333
#4  0x082a23f4 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfffcbd0) at zend_vm_execute.h:175
#5  0x082a4e98 in ZEND_DO_FCALL_SPEC_CONST_HANDLER
(execute_data=0xbfffcbd0) at zend_vm_execute.h:1535
#6  0x082a210e in execute (op_array=0x85a71bc) at zend_vm_execute.h:78
#7  0x0827e5e3 in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /usr/src/dev/php-src/Zend/zend.c:1058
#8  0x0823c0a1 in php_execute_script (primary_file=0xbffff000) at
/usr/src/dev/php-src/main/main.c:1641
#9  0x082f13c1 in main (argc=2, argv=0xbffff0d4) at
/usr/src/dev/php-src/sapi/cli/php_cli.c:944
 

------------------------------------------------------------------------

[2005-02-24 19:19:21] mbonetti at gmail dot com

Freezing doesn't happen with the provided code snipped, unless you
replace $xml1 with $xml2 in the xml_parse() call.

Reproduced on OS X 10.3.8, php 5.0.2 (both cli and web module), libxml
2.5.4

------------------------------------------------------------------------

[2005-02-23 23:16:52] kellan at pobox dot com

Description:
------------
When parsing a XML document without a prolog PHP5 seems to "freeze",
never returning from xml_parse and never calling the call backs.  This
is reproducible on both Debian/PHP 5.0.2 with libxml 2.6.11 and Mac OS
X/PHP 5.0.3 with libxml 2.6.7 

I've attached the simplest possible example to demonstrate this
(probably best to run it from the command line, but the problem is
reproducible running under Apache and from the command line)

Reproduce code:
---------------
<?php

$xml1 = '<?xml version="1.0"?><greeting>hello world</greeting>';
$xml2 = '<greeting>hello world</greeting>';
$parser = xml_parser_create('');
xml_set_element_handler($parser, "startElement", "endElement");
$status = xml_parse($parser, $xml1, true);
        
function startElement($parser, $name, $attrs) {
        echo "start $name\n";
}

function endElement($parser, $name) {
        echo "end $name\n";
}


?>

Expected result:
----------------
I would expect to see the program echo "GREETING", and then end.  This
is what happens when you run this same script under PHP4

Actual result:
--------------
It just sits there until you kill it.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=32087&edit=1

Reply via email to