PHP 4.0 Bug #4288: parse error when trying to use <?xml ... ?> declaration
| From: | hrothgar at techie dot com | Date: | Mon, 01 May 2000 20:20:12 +0000 |
| Subject: | PHP 4.0 Bug #4288: parse error when trying to use <?xml ... ?> declaration | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-18328@lists.php.net to get a copy of this message | ||
From: hrothgar@techie.com
Operating system: Linux i586 2.2.14
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Scripting Engine problem
Bug description: parse error when trying to use <?xml ... ?> declaration
Situation: I'm trying to use XHTML (HTML meets XML) to build a site. In my current
implementation, I'm trying to use an
include statement to insert the workings of a
header.php file, but for simplification purposes, I've reduced the problem down to a single,
*static* file for the parser to chew on.
Consider the file, test.php, to illustrate the problem:
>>>test.php
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en">
<head>foo</head>
<body>bar</body>
</html>
<<<test.php
I get the following parse error when trying to view this:
Parse error: parse error in /home/httpd/html/test.php on line 1
It appears that the php parser is not respecting the <?xml tag as being a non-php
tag. If a non-php <?* tag is found, the parser should simply quote the tag instead
of just dieing (IMHO). Thanks
configuration:
./configure --with-mysql --with-axps --disable-debug
apache 1.3.9