Bug #17971 Updated: Commenting out xml declaration with // causes parse error

From: Date: Tue, 25 Jun 2002 14:28:56 +0000
Subject: Bug #17971 Updated: Commenting out xml declaration with // causes parse error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12047@lists.php.net to get a copy of this message
ID: 17971 Updated by: sander@php.net Reported By: martin@classaxe.com -Status: Open +Status: Bogus -Bug Type: Reproducible crash +Bug Type: Scripting Engine problem Operating System: Windows 95/98 4.10 Apache 1.3.24 PHP Version: 4.2.1 New Comment: Expected behaviour. ?> causes PHP to stop parsing. Previous Comments: ------------------------------------------------------------------------ [2002-06-25 09:51:57] martin@classaxe.com Code Fragment: <?php header("Content-Type: text/xml"); print("" ."<?xml version='1.0' encoding='UTF-8' ?>\n" // No ."<!DOCTYPE MKS SYSTEM 'http://www.classaxe.com/mks/mks.dtd'>\n" ."<?xml-stylesheet type='text/xsl' href='mks.xslt' ?>\n" // No ."<MKS>" ." <USERLIST>" ." <USER userAcctName='Martin' " ."userAcctEmail='martin@classaxe.com'/>\n" // OK ." </USERLIST>" ."</MKS>" ); ?> For test purposes I'd like to be able to remove a stylesheet reference (second // No) but this causes a parse error when the line is an XML construct. The Block comment /* ... */ works however. Other configs tested and failed: PHP 4.0.6 on Linux 2.0.36 / Apache/1.3.23 (XML active) PHP 4.2.1 on FreeBSD 4.4-RELEASE #0 / Apache/1.3.26 (XML all active) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=17971&edit=1

« previous php.bugs (#12047) next »