ID:               27915
 User updated by:  albaity at hotmail dot com
-Summary:          Have problems with eval with comments
 Reported By:      albaity at hotmail dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: WinXP pro IIS 6
 PHP Version:      4.3.5
 New Comment:

THE PROBLEM THAT THE EVAL WILL NOT WORK GOOD IF I HAVE 

COMMENTS (IN UPPER CASE OR HAVE BEG OR END) IN MY STRING AND THAT IS
VERY BAD BECAUSE THAT IS A BAD ISSUE IF I WANT TO CREATE A (TEMPLATE
SYSTEM) AND ITS VERY BAD BECAUSE WE DO NOT HAVE A NOTE ABOUT (THAT EVAL
HAVE RESTRICTION IN STRINGS AND NOT ACCEPT COMMENTS WITH BEG OR END)


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

[2004-04-07 22:31:13] [EMAIL PROTECTED]

And what problem is that?



The only thing described in the bug report is scripting problems which
don't belong in this bug system.

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

[2004-04-07 19:47:04] albaity at hotmail dot com

the problem is with eval function

and sorry for spam or flood details :(

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

[2004-04-07 19:44:05] albaity at hotmail dot com

Description:
------------
If you are trying to add a script such as hitbox, fastcounter or
anything that has <!-- BEGIN WHATEVER CODE --> and <!-- END WHATEVER
CODE --> statements in it to .tpl file, you may be recieving such
errors as 



Quote: 

Parse error: parse error, unexpected T_STRING in
/root/phpBB/includes/template.php(127) : eval()'d code on line 50  





This is due to how phpBB handles <!-- BEGIN --> and <!-- END -->'s. The
template system is setup to interpret these in special ways, such as
loops and switches, and not having such an object between them results
in parse errors. 



So, to fix it delete the 'BEGIN' and 'END' in your HTML comments. You
should also write all of your comments in lower case. ex: 



Code that gives you errors: 



Code: 

<!-- BEGIN FASTCOUNTER CODE --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- END FASTCOUNTER CODE --> 

<br> 

<!-- BEGIN FASTCOUNTER LINK --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- END FASTCOUNTER LINK --> 

 





Will be changed to this: 



Code: 

<!-- fastcounter code --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- fastcounter code --> 

<br> 

<!-- fastcounter code --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- fastcounter code -->  





That will solve the parsing errors.

Reproduce code:
---------------
If you are trying to add a script such as hitbox, fastcounter or
anything that has <!-- BEGIN WHATEVER CODE --> and <!-- END WHATEVER
CODE --> statements in it to .tpl file, you may be recieving such
errors as 



Quote: 

Parse error: parse error, unexpected T_STRING in
/root/phpBB/includes/template.php(127) : eval()'d code on line 50  





This is due to how phpBB handles <!-- BEGIN --> and <!-- END -->'s. The
template system is setup to interpret these in special ways, such as
loops and switches, and not having such an object between them results
in parse errors. 



So, to fix it delete the 'BEGIN' and 'END' in your HTML comments. You
should also write all of your comments in lower case. ex: 



Code that gives you errors: 



Code: 

<!-- BEGIN FASTCOUNTER CODE --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- END FASTCOUNTER CODE --> 

<br> 

<!-- BEGIN FASTCOUNTER LINK --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- END FASTCOUNTER LINK --> 

 





Will be changed to this: 



Code: 

<!-- fastcounter code --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- fastcounter code --> 

<br> 

<!-- fastcounter code --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- fastcounter code -->  





That will solve the parsing errors.

Expected result:
----------------
If you are trying to add a script such as hitbox, fastcounter or
anything that has <!-- BEGIN WHATEVER CODE --> and <!-- END WHATEVER
CODE --> statements in it to .tpl file, you may be recieving such
errors as 



Quote: 

Parse error: parse error, unexpected T_STRING in
/root/phpBB/includes/template.php(127) : eval()'d code on line 50  





This is due to how phpBB handles <!-- BEGIN --> and <!-- END -->'s. The
template system is setup to interpret these in special ways, such as
loops and switches, and not having such an object between them results
in parse errors. 



So, to fix it delete the 'BEGIN' and 'END' in your HTML comments. You
should also write all of your comments in lower case. ex: 



Code that gives you errors: 



Code: 

<!-- BEGIN FASTCOUNTER CODE --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- END FASTCOUNTER CODE --> 

<br> 

<!-- BEGIN FASTCOUNTER LINK --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- END FASTCOUNTER LINK --> 

 





Will be changed to this: 



Code: 

<!-- fastcounter code --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- fastcounter code --> 

<br> 

<!-- fastcounter code --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- fastcounter code -->  





That will solve the parsing errors.

Actual result:
--------------
If you are trying to add a script such as hitbox, fastcounter or
anything that has <!-- BEGIN WHATEVER CODE --> and <!-- END WHATEVER
CODE --> statements in it to .tpl file, you may be recieving such
errors as 



Quote: 

Parse error: parse error, unexpected T_STRING in
/root/phpBB/includes/template.php(127) : eval()'d code on line 50  





This is due to how phpBB handles <!-- BEGIN --> and <!-- END -->'s. The
template system is setup to interpret these in special ways, such as
loops and switches, and not having such an object between them results
in parse errors. 



So, to fix it delete the 'BEGIN' and 'END' in your HTML comments. You
should also write all of your comments in lower case. ex: 



Code that gives you errors: 



Code: 

<!-- BEGIN FASTCOUNTER CODE --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- END FASTCOUNTER CODE --> 

<br> 

<!-- BEGIN FASTCOUNTER LINK --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- END FASTCOUNTER LINK --> 

 





Will be changed to this: 



Code: 

<!-- fastcounter code --> 

<a
href="http://member.bcentral.com/cgi-bin/fc/fastcounter-login?2440090";
target="_top"> 

<img border="0"
src="http://fastcounter.bcentral.com/fastcounter?2440090+4880187";></a>


<!-- fastcounter code --> 

<br> 

<!-- fastcounter code --> 

<font face="arial" size="1"> 

<a href="http://fastcounter.bcentral.com/fc-join";
target="_top">FastCounter by bCentral</a></font><br> 

<!-- fastcounter code -->  





That will solve the parsing errors.


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


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

Reply via email to