|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-14 12:53 UTC] tony2001@php.net
[2006-05-14 20:25 UTC] spamhere at chello dot nl
[2006-05-15 07:39 UTC] chregu@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 05:00:01 2025 UTC |
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.