Fix for: Parse error: syntax error, unexpected $end in

One of my clients asked me to debug his site, because when php5 is enabled from the control panel the site does not show anything, just white pages!

The site was built using Joomla! 1.5, so I enabled debugging mode and set the error reporting level to maximum to know what is the problem.

Then this error was displayed when opening any page:

Parse error: syntax error, unexpected $end in filename:lineno

it was the index.php file of the template, and after some debugging I found that the problem is the using of short php tags, like this:
The server was not configured to allow short tags.
For maximum compatibility, it is preferred to use full tags, like this:
Hope this help you all!


  • Comment Link adamos Monday, 08 April 2013 19:24 posted by adamos

    Parse error: syntax error, unexpected 'nts/com_sef/cache/shCacheContent.php on line 1225


  • Comment Link mahadzira Sunday, 17 March 2013 03:14 posted by mahadzira

    tq bro for the info...i got error mesg today after installing joomla and it quickly fix it. thanks a lot

  • Comment Link Friday, 07 October 2011 14:19 posted by

    It could also be a missing closing curly brace }

  • Comment Link Monday, 22 August 2011 18:01 posted by

    nothing happened for me......

  • Comment Link Saturday, 21 May 2011 07:55 posted by

    thanks for really works :D

  • Comment Link Tuesday, 01 March 2011 12:01 posted by

    thank you for your tutorial...

  • Comment Link Monday, 28 February 2011 13:54 posted by

    thanks you

  • Comment Link Sunday, 28 November 2010 19:18 posted by

    That made it, thank you so much :D

  • Comment Link Thursday, 25 November 2010 17:40 posted by

    ohh thx a lot..

  • Comment Link Thursday, 14 October 2010 15:57 posted by

    thnx that helped a lot :)

Login to post comments