php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4178 <?xml needed in XHTML
Submitted: 2000-04-18 09:36 UTC Modified: 2000-04-21 11:43 UTC
From: sven at pressflex dot com Assigned:
Status: Closed Package: Other
PHP Version: 3.0.14 OS: Linux 2.2.13
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sven at pressflex dot com
New email:
PHP Version: OS:

 

 [2000-04-18 09:36 UTC] sven at pressflex dot com
W3C's XHTML suggests the first line of your document look something like:

<?xml version="1.0" encoding="UTF-8"?>

But in PHP is tries to read that as PHP code.

The work around is to use PHP to print the header, but it would be much better to not to have to.

I would like the solution to be that <? doesn't break from HTML, only <?php but that will probably break a lot of old code.  But I would be very happy if <?xml didn't break away to HTML, and then please make <? w/o the PHP deprecated.

See:

http://www.w3.org/TR/1998/REC-xml-19980210#NT-PI

for the exact spec of what is needed.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-04-21 11:39 UTC] joey at cvs dot php dot net
Turn off short tags in your ini file.
Then you have to use <?php for PHP to begin processing,
instead of <?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 22:01:31 2024 UTC