php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50586 Greater than operator '>' causes script to drop out of PHP into HTML
Submitted: 2009-12-27 23:59 UTC Modified: 2010-01-04 01:00 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: mike at repartee dot co dot uk Assigned:
Status: No Feedback Package: *Programming Data Structures
PHP Version: 5.3.2RC1 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
40 + 29 = ?
Subscribe to this entry?

 
 [2009-12-27 23:59 UTC] mike at repartee dot co dot uk
Description:
------------
I have an old PHP script embedded in a page that is mostly html that includes the expression:
 if ($number > "2") ..... 

This has been working fine up to now but having installed PHP 5.3.1 a few days ago (updated to 5.3.2 today) locally on my new Windows 7 PC, I  find that when I run the web page containing the above bit of PHP, the PHP is terminated at the '>' ( as if it were '?>') so the rest of the PHP code appears as text in my browser.

Previously I used an earlier version of PHP and the script still runs fine on our remote web-server running PHP 5.2.8 so this really seems to be related to version 5.3 However I cannot see any reported problems on this issue. The problem occurs with both Internet Explorer and Firefox so it is not a browser problem.

I am running Apache 2.2.14 and MySQL 5.1.41.

Reproduce code:
---------------
Snippit as above:
  if ($number > "2") ..... 


Expected result:
----------------
I would expect the '>' operator to work as 'greater than'.

Actual result:
--------------
The PHP is ended at the '>' character as if it is '?>'. The rest of the code just appears as ordinary text in the browser.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-12-28 00:14 UTC] rasmus@php.net
I seriously doubt you are seeing what you think you are seeing.  Try 
doing a view-source.  I bet the entire script is there likely because 
you are using short tags and you have those disabled in your php.ini or 
you have messed up your configuration some other way.
 [2010-01-04 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 07:01:27 2024 UTC