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

  • Comments:View comments

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:

<?php

Hope this help you all!

Read 42115 times
Mohamed Abdelaziz

Joomla and PHP developer since 2006, working as freelancer to develop and customize Joomla extensions. Technically reviewed the books: Joomla! 2.5 Beginner's Guide and Joomla! 3 Beginner's Guide for Packt Publishing.

Tutorials & Demos

Joomla Extensions

Chained Fields for K2
Chained Fields for K2 It is a package to enable creating chained fields in…
Read more...
Multiple Extra Fields Groups (MEFG) for K2
Multiple Extra Fields Groups (MEFG) for K2 This is a very useful K2 plugin, which enables administrators…
Read more...
AutoMeta for K2
AutoMeta for K2 AutoMeta for K2 is a plugin to automatically generate meta…
Read more...
Categories Treeview for K2
Categories Treeview for K2 This Joomla! module is used to display K2 categories in…
Read more...
Categories Tree Menu for Virtuemart
Categories Tree Menu for Virtuemart This Joomla! module is used to display Virtuemart categories in…
Read more...
Datasets for K2
Datasets for K2 A k2 plugin that will allow an admin to choose…
Read more...
Extensions