php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66695 Insufficient documentation wrt. LIBXML_PARSEHUGE
Submitted: 2014-02-11 10:22 UTC Modified: 2016-08-27 00:13 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mart at krediidiinfo dot ee Assigned: cmb (profile)
Status: Closed Package: SimpleXML related
PHP Version: 5.5.9 OS: Suse Linux Enterprise 11 SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mart at krediidiinfo dot ee
New email:
PHP Version: OS:

 

 [2014-02-11 10:22 UTC] mart at krediidiinfo dot ee
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-11 10:29 UTC] mart at krediidiinfo dot ee
Put the xml to url also (unpacked, it's 20MB): http://www.krediidiinfo.ee/files/test.xml
 [2016-08-08 09:41 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2016-08-08 09:41 UTC] cmb@php.net
http://www.krediidiinfo.ee/files/test.xml gives 404 now. Can you
please make it available again?
 [2016-08-21 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2016-08-21 10:48 UTC] cmb@php.net
-Status: No Feedback +Status: Open
 [2016-08-21 10:48 UTC] cmb@php.net
Feedback had been provided via email. I'll investigate.
 [2016-08-22 08:24 UTC] cmb@php.net
-Summary: A well-formed XML string can't be parsed +Summary: Insufficient documentation wrt. LIBXML_PARSEHUGE -Status: Assigned +Status: Verified -Type: Bug +Type: Documentation Problem
 [2016-08-22 08:24 UTC] cmb@php.net
This issue has been resolved; the LIBXML_PARSEHUGE flag had to
be passed to the SimpleXML constructor.

It seems that the docs could be improved in this regard, so I'm
changing to doc-bug.
 [2016-08-27 00:12 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=339938
Log: Fix #66695: Insufficient documentation wrt. LIBXML_PARSEHUGE
 [2016-08-27 00:13 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=8e8be101a2e80702a0d9bd7a6b2006ae7611a4a2
Log: Fix #66695: Insufficient documentation wrt. LIBXML_PARSEHUGE
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Apr 28 16:01:31 2024 UTC