Bug #14762 Updated: DTD entities freeze xmldocfile()

From: Date: Sun, 30 Dec 2001 09:50:56 +0000
Subject: Bug #14762 Updated: DTD entities freeze xmldocfile()
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-75334@lists.php.net to get a copy of this message
ID: 14762 Updated by: mfischer Reported By: mark@chesneycorp.com Old Status: Open Status: Closed Bug Type: DOM XML related Operating System: FreeBSD 4.5-PRERELEASE PHP Version: 4.1.1 New Comment: This has been fixed in CVS already, unfortunately the fix didn't make it into the release. Thanks for the report. Closing. Previous Comments: ------------------------------------------------------------------------ [2001-12-30 04:19:46] mark@chesneycorp.com The XML document site.xml causes test.php to freeze: site.xml: --- <?xml version="1.0"?> <!DOCTYPE site [ <!ENTITY reg "&#174;"> ]> <site> <title>Don't Be Dirty&reg;</title> </site> --- test.php: --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <?php error_reporting(E_ALL); $doc = xmldocfile("site.xml"); print "\$doc: "; print_r($doc); print "<br>"; $context = $doc->xpath_new_context(); print "\$context: "; print_r($context); ?> </body> </html> --- This version of site.xml yeilded expected output: site.xml: --- <?xml version="1.0"?> <!DOCTYPE site [ ]> <site> <title>Don't Be Dirty</title> </site> --- output: --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> $doc: DomDocument Object ( [name] => [url] => site.xml [version] => 1.0 [standalone] => -1 [type] => 9 [compression] => -1 [charset] => 1 [0] => 1 [1] => 136235776 [doc] => Resource id #673363016 ) <br>$context: XPathContext Object ( [0] => 2 [1] => 136235904 ) </body> </html> --- ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14762&edit=1

« previous php.dev (#75334) next »