Eval()'d Error

Solutions for other frequently encountered problems with running phpBB.

Moderator: Moderators

Eval()'d Error

Postby DooBDee on Wed Sep 14, 2005 8:33 pm

Problem: I get the following error:
Code: Select all
Parse error: parse error, unexpected T_STRING in /root/phpBB/includes/template.php(127) : eval()'d code on line 50

Where many of you may think the error is with 'includes/template.php' it is not. It is infact with the template file it is using, for example the template file might be viewforum_body.tpl

This error can be because of an incorrect or missing switch/loop, a switch/loop starts with '<!-- BEGIN < name> -->' and ends with '<!-- END <name> -->', where <name> is the name of the switch/loop for example;
Code: Select all
<!-- BEGIN switch_user_logged_in -->

anything in here will only be shown to users that are logged in

<!-- END switch_user_logged_in -->

Each switch/loop that you use in your TPL file must be on its own line, it CANNOT share a line with "some other text/HTML" the exception to this is if you have the 'eXtreme Styles Mod installed where the limitaion of having switches on seperate lines no longer applies.

The most common cause of this error is a missing/misplaced starting or closing tag.

If you are wishing to comment in HTML / TPL file, use <!-- your comment in here -->
DooBDee
Website Ninja
DooBDee.net
User avatar
DooBDee
Moderator
Moderator
 
Posts: 3530
Joined: Tue Mar 01, 2005 6:28 pm
Location: DooBDee.net

Return to Common Problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron