4images Forum & Community

4images Help / Hilfe => Error Messages / Fehlermeldungen => Topic started by: V@no on October 18, 2008, 10:14:27 AM

Title: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: V@no on October 18, 2008, 10:14:27 AM
If you see error message similar to:
Quote
Parse error: syntax error, unexpected $end in includes/template.php(101) : eval()'d code on line 160
This means one or more template files have not matching number of {if ..} and {endif ..} or {ifno ..} and {endifno ..} template tags ( ".." is the name of a tag, i.e. {if blahexample} and {endif blahexample})
Such error didn't show on 4images v1.7, so if your template worked on v1.7 and after 4images upgrade it shows this error, it means your template is not compatible with new 4images, read next how you can make your template compatible.

What you'll need to do is search in all .html template files for all {if ..} and {ifno ..} tags and make sure they have matching {endif ..} and {endifno ..} tags.
Also, the number of {if ..} and {ifno ..} must be equal to number of {endif ..} and {endifno ..} tags in each template file.

For example this is wrong, because it has only one {if ..} and two {endif ..} tags:
Code: [Select]
{if blahexample}
....some html stuff....
{endif blahexample}
...some more html stuff...
{endif blahexample}

Or change template.
Title: Re: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: yesme on February 14, 2009, 10:59:14 AM
Thank you V@no. You have released my tension just now. :)
Title: Re: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: d1eter on August 13, 2009, 04:24:35 PM
Hello..,
I have v1.7.6 website which has been running fine most of the time, I haven;t been visited the ACP for probably almost two months.

Now I have to change some Categories in the website so I visited the ACP.
it gives the error "Parse error: syntax error, unexpected $end in /home/a7746017/public_html/admin/admin_functions.php on line 64"

is it the same symptom as covered in this thread..?
how do I fix the error?

thank you very much for the help!
Title: Re: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: V@nо on August 13, 2009, 10:17:40 PM
no, your error is different. something is wrong with your admin/admin_functions.php
try restore that file from backups
Title: Re: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: d1eter on August 14, 2009, 02:41:46 AM
no, your error is different. something is wrong with your admin/admin_functions.php
try restore that file from backups

thanks Vano..,
you're right.., I did try to restore but result still the same.
turns out.. my latest and before backup.., got corrupted somehow. the file got truncated.

I end up replacing the file with the original file from 1.7.6 package.

All is OK now.
Thank you for the hints!

Title: Re: Parse error: syntax error, unexpected $end in includes/template.php(101)
Post by: TMO on March 13, 2010, 01:01:06 PM
hi,
 for some reason i get an error message, trying to plugin a picture into a new category.

Fatal error: Cannot break/continue 1 level in /home/www/web4161/html/swb9001/db/includes/template.php(101) : eval()'d code on line 97

if i delete this image, category page work well again without any picture of course.

I try to solve this problem looking for Tags Errors, but without success, may anyone help me?

Thanks
TMO