Re: [xml] Fatal error 5 for libxml 2.9.0 but working in 2.6.32



On Mon, Jun 17, 2013 at 10:42:54AM -0500, Stephen E Slevinski Jr wrote:
I have a 13 MB xml file that is causing problems for libxml 2.9.0
but works fine for 2.6.32.

  Have you tried with 2.9.1 ? You could be hitting a bug on buffers
which  was fixed in latest release.

I am using PHP 5.3.25 with the domdocument loadxml function.

2 weird circumstances:
1) The offending entry doesn't cause problems in smaller XML files.
2) The offending entry only causes problems if it is the last entry
in the XML file.

My temporary fix is to add an extra entry at the end of the XML
document. Notice that the good XML is larger.
13108670 http://signbank.org/signpuddle2.0/data/spml/sgn28.good.xml
13108514 http://signbank.org/signpuddle2.0/data/spml/sgn28.bad.xml

I've zipped the XML as well.
3245550 http://signbank.org/signpuddle2.0/data/spml/sgn28.good.zip
3245530 http://signbank.org/signpuddle2.0/data/spml/sgn28.bad.zip

 works for me with git head and 2.9.1

thinkpad:~/XML -> unzip sgn28.bad.zip
Archive:  sgn28.bad.zip
  inflating: sgn28.bad.xml           
thinkpad:~/XML -> xmllint --noout sgn28.bad.xml
thinkpad:~/XML -> xmllint --noout -stream sgn28.bad.xml
thinkpad:~/XML -> /usr/bin/xmllint --noout sgn28.bad.xml
thinkpad:~/XML -> /usr/bin/xmllint --noout -stream sgn28.bad.xml
thinkpad:~/XML -> /usr/bin/xmllint --version
/usr/bin/xmllint: using libxml version 20901
   compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1
FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude Iconv
ISO8859X Unicode Regexps Automata Expr Schemas Schematron Modules Debug
Zlib Lzma
thinkpad:~/XML -> 


Any ideas or suggestions would be appreciated.

upgrade to 2.9.1 and retry. You may have to restart PHP so it takes the
new dynamically linked shared libs.

Daniel

-- 
Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]