PHP 4.0 Bug #7052 Updated: CDATA causes auto generate wrong HTML header

From: Date: Fri, 12 Jan 2001 16:50:53 +0000
Subject: PHP 4.0 Bug #7052 Updated: CDATA causes auto generate wrong HTML header
Groups: php.dev 
Request: Send a blank email to php-dev+get-43888@lists.php.net to get a copy of this message
ID: 7052 Updated by: sniper Reported By: kenny@yellowzone.com Old-Status: Open Status: Closed Bug Type: DOM XML related Assigned To: Comments: Fixed in CVS. --Jani Previous Comments: --------------------------------------------------------------------------- [2000-10-06 05:17:01] kenny@yellowzone.com I used xmltree () function to parse a XML code like the following: model2.xml ------------------------------- <dmt_body> <![CDATA[ whatever things. ]]> </dmt_body> -------------------------------- Netscape will compliant "The document contained no data". And IE will say "The Page can not be displayed..." My php code looks like the following: ------------------------------------------- <html><pre> <? $data = implode("",file("model2.xml")); // Error is generated here, by xmltree // even there is no print_r() statement. $osah = xmltree ($data); ?> </pre></html> ------------------------------------------- I used Apache 1.3.12 and libxml2-2.2.4 --------------------------------------------------------------------------- [2000-10-06 02:20:47] kenny@yellowzone.com I used xmltree () function to parse a XML code like the following: ------------------------------- <dmt_body> <![CDATA[ whatever things. ]]> </dmt_body> -------------------------------- It will create following header and send to the web browser by itself. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Since this is not a valid header, IE will not display any content after that. Does any one know what's wrong and how to fix it? I used Apache 1.3.12 and libxml2-2.2.4 --------------------------------------------------------------------------- [2000-10-06 02:14:32] kenny@yellowzone.com I used xmltree () function to parse a XML code like the following: ------------------------------- <dmt_body> <![CDATA[ fool < alio@yello.net > kinda missing. ]]> </dmt_body> -------------------------------- It will create following header and send to the web browser by itself. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> Since this is not a valid header, IE will not display any content after that. Does any one know what's wrong and how to fix it? --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=7052

« previous php.dev (#43888) next »