From: andrew at shh dot fi Operating system: win32 and linux PHP version: 4.3.2 PHP Bug Type: XSLT related Bug description: Sablot XSLT gives error 3 when xml file too big
Description: ------------ The setup is an xml document with several external entities including xml files. Using the standard xslt functions in php the problem begins when the filesize exceed a limit (don't know what the size is unless I start couting all the includes). By choopping out a number of lines from the files the problem is OK. Its not about structure as this works OK in MsXML plus other packages like XML Spy. The problem is definately with the sablot/expat somewhere. I am not sure whether its a combination of entities and filesize or just filesize. What appears to be happening is some kind of cache that chops the end off therefore giving an error 3 which is an no element found error. Perhaps the problem is with expat? Any ideas? Reproduce code: --------------- <? $xml = "file://".getcwd()."\\index.xml"; $xsl = "file://".getcwd()."\\text.xsl"; //create the processor $my_xslt = xslt_create(); //process the file and echo the result $result = xslt_process($my_xslt,$xml,$xsl); if (!$result) { print "Error Number: ".xslt_errno($my_xslt); print xslt_error($my_xslt); } //free the processor xslt_free($my_xslt); print htmlspecialchars($result); ?> Expected result: ---------------- A load of text .... Actual result: -------------- Warning: Sablotron error on line 293: XML parser error 3: no element found in E:\projects\studybuilder\parse.php on line 12 Error Number: 2 XML parser error 3: no element found -- Edit bug report at http://bugs.php.net/?id=24296&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24296&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24296&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24296&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24296&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24296&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24296&r=support Expected behavior: http://bugs.php.net/fix.php?id=24296&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24296&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24296&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24296&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24296&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24296&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24296&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24296&r=gnused