Req #68325 [Opn]: LIBXML_PARSEHUGE cannot be set for xml_parser_create

From: Date: Mon, 02 Apr 2018 00:12:56 +0000
Subject: Req #68325 [Opn]: LIBXML_PARSEHUGE cannot be set for xml_parser_create
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-214559@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68325&edit=1 ID: 68325 Updated by: cmb@php.net Reported by: pdx at pdx dot hu Summary: LIBXML_PARSEHUGE cannot be set for xml_parser_create Status: Open Type: Feature/Change Request Package: XML related Operating System: CentOS PHP Version: 5.4.34 Block user comment: N Private report: N New Comment: FWIW: it is possible to parse large XML documents in chunks; a respective example has been added to the manual[1]. With this technique, processing psd7003.xml[2] worked without problems. [1] <http://svn.php.net/viewvc?view=revision&revision=344608> [2] <http://aiweb.cs.washington.edu/research/projects/xmltk/xmldata/www/repository.html#pir> Previous Comments: ------------------------------------------------------------------------ [2014-10-29 17:13:20] pdx at pdx dot hu Description: ------------ --- From manual page: http://www.php.net/function.xml-parser-set-option --- Short story: since LibXML>2.7.6 larger xml chunks must be explicitly allowed by setting LIBXML_PARSEHUGE for libxml. There is no option to do that with xml_parser_set_option. And believe me, xml_parser indeed chokes on most of what I throw at it. Please see this discussion at http://stackoverflow.com/questions/25042325/sax-parser-php-no-memory-at-line-x . The version is actually 5.4.33 (the latest available 5.4 branch on Remi's CentOS packages), but from the documentation it's clear that it hasn't been dealt with yet. Also, bug#65604 https://bugs.php.net/bug.php?id=65604&edit=2 deals with the same source of problem, but there has been no fix as of yet. Test script: --------------- not necessary. Expected result: ---------------- correct XML parsing as before. Actual result: -------------- XML error: No memory at line XX (various). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68325&edit=1

« previous php.bugs (#214559) next »