Bug #17971: Commenting out xml declaration with // causes parse error
| From: | martin at classaxe dot com | Date: | Tue, 25 Jun 2002 13:51:57 +0000 |
| Subject: | Bug #17971: Commenting out xml declaration with // causes parse error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-12043@lists.php.net to get a copy of this message | ||
From: martin@classaxe.com
Operating system: Windows 95/98 4.10 Apache 1.3.24
PHP version: 4.2.1
PHP Bug Type: Reproducible crash
Bug description: Commenting out xml declaration with // causes parse error
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 bug report at http://bugs.php.net/?id=17971&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17971&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17971&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17971&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17971&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17971&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17971&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17971&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17971&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17971&r=globals