ID: 44125 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: XML related Operating System: Windows Vista PHP Version: 5.2.5 New Comment:
P.S. There is a rather obvious (and effective) workaround for this: realpath($file) before passing it to DOMDocument::load(). However, in theory, such a call should not be necessary. Previous Comments: ------------------------------------------------------------------------ [2008-02-15 00:27:42] [EMAIL PROTECTED] Description: ------------ On Windows, XML files with large amounts of XIncludes (such as the PHP Documentation Manual, where this bug was discovered) exhibit curious behavior when they were loaded with Unix-style paths: they appear to require double the memory than if they were loaded with Windows-style paths. Reproduce code: --------------- <?php // note forward slashes $file = 'C:/Users/Edward/phpdoc/manual.xml'; $dom = new DOMDocument(); echo "Loading XML\n"; $dom->load($file); echo "Performing XIncludes\n"; $dom->xinclude(); Expected result: ---------------- With an external process manager (Task Manager or Process Explorer), memory usage should spike on $dom->load(), and then stay constant during XIncludes. XIncludes should be very quick. Actual result: -------------- XIncludes take a long time to run, and double the memory usage of php.exe. A curious side-effect of this is that call to $dom->load() immediately after the offending XInclude is extremely slow. This can be from a completely separate process. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=44125&edit=1
