ID:               31829
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lphuberdeau at phpquebec dot org
-Status:           Open
+Status:           Feedback
 Bug Type:         *XML functions
 Operating System: Windows 2000
 PHP Version:      5.0.3
 New Comment:

Most certainly a libxml2 bug. PHP has nothing to do with the actual
parsing and validation.

Can you check with xmllint, if that has the same problem? And update to
the latest libxml2 libraries, they were quite some fixes lately
regarding XSDs.





Previous Comments:
------------------------------------------------------------------------

[2005-02-03 16:02:19] lphuberdeau at phpquebec dot org

Description:
------------
When validating an XML document using a schema with references to other
schemas, the validation falls in a loop until the script dies due to
insufficient memory. Seems like there is no check to verify if the file
has already been included. This bug might actually be located in
libxml2.

I was able to avoid the problem by only placing includes in the primary
XSD.

Reproduce code:
---------------
Validate a DOM tree with a schema (schema1.xsd) with the following
structure:

schema1.xsd:
include schema2.xsd
include schema3.xsd

schema2.xsd:
include schema3.xsd

schema3.xsd:
include schema2.xsd

Expected result:
----------------
The file to validate, ignoring any already included files, or at least
throw an exception.

Actual result:
--------------
Using PHP-CLI, the system goes in an infinite loop and uses all
available system memory. I would suspect the script to crash in a web
environment with a memory limit.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=31829&edit=1

Reply via email to