#46699 [Opn->Fbk]: xml_parse fails with Bus Error only when parser is namespace aware.
| From: | jani@php.net | Date: | Fri, 28 Nov 2008 12:29:37 +0000 |
| Subject: | #46699 [Opn->Fbk]: xml_parse fails with Bus Error only when parser is namespace aware. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-131438@lists.php.net to get a copy of this message | ||
ID: 46699
Updated by: jani@php.net
Reported By: m dot haarmann at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: XML related
Operating System: Mac OS 10.5.5
PHP Version: 5.2.6
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
Previous Comments:
------------------------------------------------------------------------
[2008-11-27 20:17:28] m dot haarmann at gmail dot com
this problem doesn't occur when using just xml_create_parser, without
the namespace awareness. i'm using the php and apache2 versions that
are
bundled with mac os.
------------------------------------------------------------------------
[2008-11-27 20:02:51] m dot haarmann at gmail dot com
Description:
------------
When executing xml_parse on a parser handle that was created using
xml_create_parser_ns, the script fails.
Reproduce code:
---------------
// dummy handlers
function defaultTagHandler($parser,$data){
echo $data;
}
//cont'd
function namespaceBla($parser,$user_data,$prefix){
}
// read a file
$filename = "demo.xml";
$file_data = implode("",file($filename));
$parser = xml_parser_create_ns();
xml_set_default_handler($parser,"defaultTagHandler");
xml_set_start_namespace_decl_handler($parser,"namespaceBla");
xml_set_end_namespace_decl_handler($parser,"namespaceBla");
// crashes here.
xml_parse($parser,$file_data);
Expected result:
----------------
to echo some node data.
Actual result:
--------------
bus error.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46699&edit=1