Bug 56181 - Comment in PHP script causes parse error.
Comment in PHP script causes parse error.
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: php (Show other bugs)
7.2
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Phil Copeland
David Lawrence
http://bugs.php.net/bug.php?id=14042
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-13 12:21 EST by Michael De La Rue
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-07 18:59:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael De La Rue 2001-11-13 12:21:13 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Nokia; N o 
k i a)

Description of problem:
When running a script with an if statement and a comment on PHP under 
RedHat 7.2 I get a parse error.  The same script running under RedHat 7.1 
does not produce this error.

Same bug is reported to PHP bug list.
http://bugs.php.net/bug.php?id=14042

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.create the following script
<?php
	if (($rows < 1)) {
		echo "hi ho\n";
//		echo  "<table border=1 width=50%>";
	}
?>

2. run it (php <script name>)
3. read parse error like so
	


Actual Results:  X-Powered-By: PHP/4.0.6

Content-type: text/html



<br>
<b>Parse error</b>:  parse error in <b>parsetest.php</b> on line
<b>10</b><br>


Expected Results:  X-Powered-By: PHP/4.0.4pl1

Content-type: text/html



hi ho


Additional info:

Easy work around:

delete the comment line.
Comment 1 Michael De La Rue 2001-11-14 04:05:25 EST
PHP has set this bug as bogus.  

http://bugs.php.net/bug.php?id=14042

My feeling is that ASP tag support must have been turned on in RedHat 7.2 and 
not been on in 7.1, in which case a warning should be present somewhere...  
Hmm.  

Anyway, solution is "edit your php.ini and disbable asp-tags" 

and the bug could be that asp tags should be disabled or a warning should be 
given somewhere; e.g. in the release notes.
Comment 2 Phil Copeland 2002-01-08 14:55:28 EST
Errrrrrrm

[root@alpha /root]# cat t
<?php
         if (($rows < 1)) {
                 echo "hi ho\n";
 //              echo  "<table border=1 width=50%>";
         }
 ?>
[root@alpha /root]# php t
X-Powered-By: PHP/4.0.4pl1
Content-type: text/html

hi ho


ok lets try a 7.2 box,...
[root@bryce2 root]# php t
X-Powered-By: PHP/4.0.6
Content-type: text/html

hi ho



I can assure you that the 7.2 box is cleanly installed.
Perhaps you've got an odd control char in there somewhere?

Phil
=--=

Note You need to log in before you can comment on or make changes to this bug.