[SOLVED] Parse Error - "unexpected $end"

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

[SOLVED] Parse Error - "unexpected $end"

Post by JeRicHoOL »

Does anyone know how I can fix the following error?

Parse error: syntax error, unexpected $end in /cache/tpl_BlackSmoke_index_body.html.php on line 168

1. I don't have this file in my cache anymore because I cleared it
2. In my original index_body.html file line 168 is blank

Here are lines 165-173

Code: Select all

<div class="content">
		
		<fieldset>
		
			{S_HIDDEN_FIELDS}<a href="http://www.the-kliq.com/ucp.php?mode=login" alt="Login"><input type="submit" name="login" tabindex="6" value="{L_LOGIN}" class="button1" /></a></center>

            <p></p>
		</fieldset>
</div>
Last edited by JeRicHoOL on Wed Aug 12, 2009 1:27 am, edited 1 time in total.

JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Parse Error - "unexpected $end"

Post by JeRicHoOL »

I deleted the tpl files in the cache and now I get the following error.

Parse error: syntax error, unexpected $end in /includes/template.php(187) : eval()'d code on line 168

Line 165-170

Code: Select all

if (!empty($phpbb_hook) && $phpbb_hook->call_hook(array(__CLASS__, __FUNCTION__), $handle, $include_once))
		{
			if ($phpbb_hook->hook_return(array(__CLASS__, __FUNCTION__)))
			{
				return $phpbb_hook->hook_return_result(array(__CLASS__, __FUNCTION__));
			}
Line 185-190

Code: Select all

else
		{
			eval(' ?>' . $this->compiled_code[$handle] . '<?php ');
		}

		return true;
Please help me to ix this issue.

User avatar
ric323
Former Team Member
Posts: 22909
Joined: Tue Feb 06, 2007 12:33 am
Location: Melbourne, Australia
Name: Ric
Contact:

Re: Parse Error - "unexpected $end"

Post by ric323 »

The line numbers in the original html file do not directly correlate to the line numbers in the cache file.
There should now be a copy of that file in the cache folder again (it is re-generated automatically) so now check line # 168 in /cache/tpl_BlackSmoke_index_body.html.php
The Knowledge Base contains solutions to many common problems!
How to fix "Doesn't have a default value" and "Incorrect string value: xxx for column 'post_text' " errors.
How to do a clean re-install of the latest phpBB3 version.
Problems with permissions? Read phpBB3 Permissions

JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Parse Error - "unexpected $end"

Post by JeRicHoOL »

I can't watch the files content because it suddenly says I have no permission. Cache folder is 777 and the tpl index body file is 620 and it doesnt allow me to change it. :?:

JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Parse Error - "unexpected $end"

Post by JeRicHoOL »

I just contacted my host because I can't change the CHMOD of this file nor can't I download it onto my PC to find out what's on line 168. I already tried Filezilla and SmartFTP but both told me that I'm not permitted to execute this operation.

JeRicHoOL
Registered User
Posts: 449
Joined: Sun Jun 01, 2008 4:02 pm

Re: Parse Error - "unexpected $end"

Post by JeRicHoOL »

Someone on another site gave me the following tip:
Looks like you've got an IF conditional in the template that wasn't closed with an ENDIF. Look for a missing ENDIF in your template file.
So I just randomly added an

Code: Select all

<!-- ENDIF -->
to the area where I took out the flash image and now my site is working again.

Thanks anyways. :)

Locked

Return to “[3.0.x] Support Forum”