From: spamhere at chello dot nl Operating system: win xp/2000 PHP version: 5.1.4 PHP Bug Type: DOM XML related Bug description: dom->schemaValidate crashes when xml contains tags with multiple CDATA sections
Description: ------------ Validating an xml file containing tags with multiple CDATA sections 'crashes' Apache. (see Actual Result) schemaValidateSource causes the same unexpected result. Workaround is available, but consequences have not been thouroughly investigated: use $dom->load($xmlfile, LIBXML_NOCDATA); instead of $dom->load($xmlfile); System configuration: (but reproducible on all kinds of Windows configurations: 2000 / 2003) Windows XP Version 2002 SP2 PHP 5.1.4 (and PHP 5.1.3 and 5.1.0) Apache 2.0.55 (but also on 2.0.54 and 2.0.53 with or without SSL) With or without php_oci.dll enabled Reproduce code: --------------- php script: <?php $dom = new DomDocument(); if ($dom->load($xmlfile)) { if ($dom->schemaValidate($schemafile)) { echo 'valid'; } else { echo 'invalid'; } } ?> xml: <?xml version="1.0" encoding="windows-1252"?> <x:checklist xmlns:x="urn:checklists"> <bevinding><![CDATA[cdata section 1]]>hello<![CDATA[cdata section 2]]></bevinding> </x:checklist> xsd (schema): <?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:v="urn:checklists" targetNamespace="urn:checklists"> <element name="checklist" type="v:CheckListData"> </element> <complexType name="CheckListData"> <all> <element name="bevinding" type="string" minOccurs="1" maxOccurs="1"/> </all> </complexType> </schema> Expected result: ---------------- schemaValidate boolean result or schemaValidateSource boolean result Actual result: -------------- Apache crashing: [Sun May 14 14:02:34 2006] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sun May 14 14:02:34 2006] [notice] Apache/2.0.55 (Win32) PHP/5.1.4 configured -- resuming normal operations [Sun May 14 14:02:34 2006] [notice] Server built: Oct 9 2005 19:16:56 [Sun May 14 14:02:34 2006] [notice] Parent: Created child process 3512 [Sun May 14 14:02:34 2006] [notice] Child 3512: Child process is running [Sun May 14 14:02:34 2006] [notice] Child 3512: Acquired the start mutex. [Sun May 14 14:02:34 2006] [notice] Child 3512: Starting 25 worker threads. -- Edit bug report at http://bugs.php.net/?id=37435&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37435&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=37435&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37435&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=37435&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=37435&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=37435&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=37435&r=needscript Try newer version: http://bugs.php.net/fix.php?id=37435&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=37435&r=support Expected behavior: http://bugs.php.net/fix.php?id=37435&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=37435&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=37435&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=37435&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37435&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=37435&r=dst IIS Stability: http://bugs.php.net/fix.php?id=37435&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=37435&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=37435&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=37435&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=37435&r=mysqlcfg