ID:               45683
 Updated by:       [EMAIL PROTECTED]
 Reported By:      mephtu at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Scripting Engine problem
 Operating System: linux
 PHP Version:      5.2.6
 New Comment:

Disable short_open_tag in your php.ini. No bug.


Previous Comments:
------------------------------------------------------------------------

[2008-08-01 22:11:19] mephtu at yahoo dot com

Description:
------------
Using apache 2.0, I added a content handler for XML files so they get
processed by a PHP script.  I want to include XML files into an output
buffer but I get an "Unexpected T_STRING" parse error from the "<?xml
version="1.0"?> processing instruction.  This is because PHP is,
incorrectly, parsing all processing instructions as PHP code.

httpd.conf: 
...
AcceptPathInfo On
...

.htaccess:
...
Action process ./process.php
AddHandler process .xml
...

Reproduce code:
---------------
process.php:
<?php
ob_start();
include($_SERVER("PATH_TRANSLATED"));
ob_end_flush();
?>

content.xml:
<?xml version="1.0"?>
<tag>some data</tag>



Expected result:
----------------
I expect to see the following in "view source" in my browser:

<?xml version="1.0"?>
<tag>some data</tag>


Actual result:
--------------
PHP incorrectly attempts to parse the XML declaration at the beginning
of content.xml giving an "Unexpected T_STRING, line 1, content.xml"
error.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45683&edit=1

Reply via email to