#47078 [NEW]: xmlparser does not return entities
| From: | jan dot matousek at skype dot net | Date: | Mon, 12 Jan 2009 12:32:42 +0000 |
| Subject: | #47078 [NEW]: xmlparser does not return entities | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-132785@lists.php.net to get a copy of this message | ||
From: jan dot matousek at skype dot net
Operating system: Mac OS X 10.5
PHP version: 5.2.8
PHP Bug Type: XML related
Bug description: xmlparser does not return entities
Description:
------------
XML parser does not return entities (& > < "). The problem
occurs only when running PHP as apache2 module, and does not occur with PHP
apache2 module supplied with Mac OS (PHP 5.2.6 built: Jul 15 2008
23:16:51).
Having compiled php-5.2.8 and httpd-2.2.10. Configure command is
./configure --with-apxs2=/usr/local/apache2/bin/apxs
Also happens with compiled php-5.2.6, I have not tried other versions.
I am prepared to provide more details when necessary.
Reproduce code:
---------------
<?php
function char_data($p, $data) { echo "[[$data]]\n"; }
$p = xml_parser_create();
xml_set_character_data_handler($p, 'char_data');
xml_parse($p, '<?xml version="1.0"?><root>c&a</root>',
true);
Expected result:
----------------
[[c]]
[[&]]
[[a]]
Actual result:
--------------
[[c]]
[[a]]
--
Edit bug report at http://bugs.php.net/?id=47078&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47078&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47078&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47078&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=47078&r=fixedcvs
Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47078&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=47078&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=47078&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=47078&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=47078&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=47078&r=support
Expected behavior: http://bugs.php.net/fix.php?id=47078&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=47078&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=47078&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=47078&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47078&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=47078&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=47078&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=47078&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=47078&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=47078&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=47078&r=mysqlcfg