php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39772 Some php tags displayed in window
Submitted: 2006-12-07 21:39 UTC Modified: 2006-12-07 22:08 UTC
From: sgaughan at aamatrix dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.0 OS: Windows Xp /W Apachie
Private report: No CVE-ID: None
 [2006-12-07 21:39 UTC] sgaughan at aamatrix dot com
Description:
------------
PHP outputs php code and does not execute it in some situations.

It appears to happen alot with ?> ending php scripts.

Sorry, I see this bug has been summited but I dont see a real logical answer.

Looks like one of the entries was just spam, and the other one said the problem should be fixed but did not say much else.

Like, how to patch my php or what version the problem is fixed in.

I am at work, and can not access outside CVS or SVNS due to a firewall =(


Reproduce code:
---------------
Running Media Wiki,

The code >? is outputted to my browser.

Today I installed php 5.2 and Apache on another server and I first noticed this same issue with my email script

the echo or the object was causing the php to output my code to the browser.

The Media Wiki, I did not write, so I don't know what that issue is, but according to Wiki it should work on 5.0x of php.

Any ways I did write my email script code and It was doing the same thing. outputting parts of the php code.




Expected result:
----------------
PHP Code to Execute and browser to not be filled with code =)

Actual result:
--------------
Browser is displaying some of the code and causing applications to fail.


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-07 22:01 UTC] tony2001@php.net
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.

You either forgot to enable short_open_tag = On in your php.ini or did not enable PHP itself.
In both cases it's not PHP problem.
 [2006-12-07 22:04 UTC] sgaughan at aamatrix dot com
Hmm..

It is a bug, it is outputting code to the browser.

some thing a simple as 

<?

//if you include a object in here, or a some odd combination //of echos you get ?> on the top of your browser.

echo "hello world";
echo "hello world";
echo "hello world";
echo "hello world";

?>
 [2006-12-07 22:08 UTC] tony2001@php.net
Again, you either forgot to enable short_open_tag = On in your php.ini or did not enable PHP itself.
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 13:00:01 2026 UTC