#34769 [Opn->Bgs]: Couldn't process xhtml prologue
| From: | sniper@php.net | Date: | Fri, 07 Oct 2005 07:25:08 +0000 |
| Subject: | #34769 [Opn->Bgs]: Couldn't process xhtml prologue | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-86168@lists.php.net to get a copy of this message | ||
ID: 34769
Updated by: sniper@php.net
Reported By: sbcty at 126 dot com
-Status: Open
+Status: Bogus
Bug Type: Compile Failure
Operating System: Windows NT
PHP Version: 5.0.5
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
Disable short tags in php.ini.
Previous Comments:
------------------------------------------------------------------------
[2005-10-07 02:49:14] sbcty at 126 dot com
Description:
------------
If an xhtml file hava first line like this
"<?xml version="1.0" encoding="UTF-8"?>"
PHP will report an error:
"parse error, unexpected T_STRING in bug.php on line 1"
It seems to be PHP check (1)<? ... ?> or (2)<?php ... ?>
and think it contain PHP code. If document contain
something like this (3)"<?... ... ?>" PHP will report an
error.
Reproduce code:
---------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Bug Report</title>
</head>
<body>
<?php echo 'Message ...'; ?>
</body>
</html>
Expected result:
----------------
This will work well. PHP couldn't to parse anything unless
it is "<?php ...?>".
Actual result:
--------------
PHP Parse error: parse error, unexpected T_STRING in bug.php on line
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34769&edit=1