Bug #66695 [NEW]: A well-formed XML string can't be parsed

From: Date: Tue, 11 Feb 2014 10:22:06 +0000
Subject: Bug #66695 [NEW]: A well-formed XML string can't be parsed
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184258@lists.php.net to get a copy of this message
From: mart at krediidiinfo dot ee Operating system: Suse Linux Enterprise 11 SP3 PHP version: 5.5.9 Package: SimpleXML related Bug Type: Bug Bug description:A well-formed XML string can't be parsed Description: ------------ A well-formed XML (attached below in the patch file place, zipped) can't be parsed by SimpleXMLElement::__construct, it gives internal error instead. No extra modules, packages, no modifications to php.ini Test script: --------------- <?php $contentXML = file_get_contents("test.xml"); $sxml = new SimpleXMLElement($contentXML); ?> Expected result: ---------------- SimpleXMLElement object representing data. Actual result: -------------- Warning: SimpleXMLElement::__construct(): Entity: line 182036: parser error : internal error in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Warning: SimpleXMLElement::__construct(): vi vald, Ida-Virumaa 41531 (tel 111 2345, e-posti aadress: nimi.teine notar.ee). in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Warning: SimpleXMLElement::__construct(): ^ in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Warning: SimpleXMLElement::__construct(): Entity: line 182036: parser error : Extra content at the end of the document in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Warning: SimpleXMLElement::__construct(): vi vald, Ida-Virumaa 41531 (tel 111 2345, e-posti aadress: nimi.teine notar.ee). in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Warning: SimpleXMLElement::__construct(): ^ in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 Fatal error: Uncaught exception 'Exception' with message 'String could not be parsed as XML' in test.php on line 3 Exception: String could not be parsed as XML in test.php on line 3 Call Stack: 0.0001 229872 1. {main}() test.php:0 0.0111 21037824 2. SimpleXMLElement->__construct() test.php:3 -- Edit bug report at https://bugs.php.net/bug.php?id=66695&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=66695&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=66695&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=66695&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=66695&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=66695&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=66695&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=66695&r=needscript Try newer version: https://bugs.php.net/fix.php?id=66695&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=66695&r=support Expected behavior: https://bugs.php.net/fix.php?id=66695&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=66695&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=66695&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=66695&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66695&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=66695&r=dst IIS Stability: https://bugs.php.net/fix.php?id=66695&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=66695&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=66695&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=66695&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=66695&r=mysqlcfg

« previous php.bugs (#184258) next »