Bug 56181

Summary: Comment in PHP script causes parse error.
Product: [Retired] Red Hat Linux Reporter: Michael De La Rue <michael.delarue>
Component: phpAssignee: Phil Copeland <copeland>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: low Docs Contact:
Priority: medium    
Version: 7.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://bugs.php.net/bug.php?id=14042
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-12-07 23:59:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael De La Rue 2001-11-13 17:21:13 UTC
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 09:05:25 UTC
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 19:55:28 UTC
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
=--=