Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2008
    Posts
    17
    Plugin Contributions
    0

    Default Parse error: syntax error, unexpected ';' in admin/includes/init_includes/init_templa

    Hi,

    I have problems with my admin panel, It wont let me log in. Could someone please tell me what this means?

    Parse error: syntax error, unexpected ';' in /home/earthly/public_html/shop/admin/includes/init_includes/init_templates.php on line 37

    This is the code of that file:

    <?php
    /**
    * @package admin
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: init_templates.php 3739 2006-06-09 21:09:35Z drbyte $
    */
    if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
    }
    // Set theme related directories
    $template_query = $db->Execute("select template_dir
    from " . TABLE_TEMPLATE_SELECT .
    " where template_language = '0'");

    $template_dir = $template_query->fields['template_dir'];
    $template_query = $db->Execute("select template_dir
    from " . TABLE_TEMPLATE_SELECT .
    " where template_language = '" . $_SESSION['languages_id'] . "'");

    if ($template_query->RecordCount() > 0) {
    $template_dir = $template_query->fields['template_dir'];
    }

    // define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_CATALOG_TEMPLATE . $template_dir . '/images/');
    define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_CATALOG_TEMPLATE . 'template_default' . '/images/');
    define('DIR_WS_TEMPLATE_ICONS', DIR_WS_TEMPLATE_IMAGES . 'icons/');

    require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'template_func.php');
    $template = new template_func(DIR_WS_TEMPLATE);

    /**
    * send the content charset "now" so that all content is impacted by it - this is important for non-english sites
    */
    header("Content-Type:text/htmlcharset=".CHARSET
    ?>

    Thanks in advance!

  2. #2
    Join Date
    Jul 2008
    Posts
    17
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected ';' in /home/earthly/public_html/shop/admin

    Quote Originally Posted by so2006 View Post
    Hi,

    I have problems with my admin panel, It wont let me log in. Could someone please tell me what this means?

    Parse error: syntax error, unexpected ';' in /home/earthly/public_html/shop/admin/includes/init_includes/init_templates.php on line 37

    This is the code of that file:

    <?php
    /**
    * @package admin
    * @copyright Copyright 2003-2006 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: init_templates.php 3739 2006-06-09 21:09:35Z drbyte $
    */
    if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
    }
    // Set theme related directories
    $template_query = $db->Execute("select template_dir
    from " . TABLE_TEMPLATE_SELECT .
    " where template_language = '0'");

    $template_dir = $template_query->fields['template_dir'];
    $template_query = $db->Execute("select template_dir
    from " . TABLE_TEMPLATE_SELECT .
    " where template_language = '" . $_SESSION['languages_id'] . "'");

    if ($template_query->RecordCount() > 0) {
    $template_dir = $template_query->fields['template_dir'];
    }

    // define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_CATALOG_TEMPLATE . $template_dir . '/images/');
    define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_CATALOG_TEMPLATE . 'template_default' . '/images/');
    define('DIR_WS_TEMPLATE_ICONS', DIR_WS_TEMPLATE_IMAGES . 'icons/');

    require(DIR_FS_CATALOG . DIR_WS_CLASSES . 'template_func.php');
    $template = new template_func(DIR_WS_TEMPLATE);

    /**
    * send the content charset "now" so that all content is impacted by it - this is important for non-english sites
    */
    header("Content-Type:text/htmlcharset=".CHARSET
    ?>

    Thanks in advance!
    I got that sorted now by changing the code to this:

    PHP Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: init_templates.php 3739 2006-06-09 21:09:35Z drbyte $
     */
    if (!defined('IS_ADMIN_FLAG')) {
      die(
    'Illegal Access');
    }
    // Set theme related directories
      
    $template_query $db->Execute("select template_dir
                                      from " 
    TABLE_TEMPLATE_SELECT .
                                      
    " where template_language = '0'");

      
    $template_dir $template_query->fields['template_dir'];
      
    $template_query $db->Execute("select template_dir
                                      from " 
    TABLE_TEMPLATE_SELECT .
                                      
    " where template_language = '" $_SESSION['languages_id'] . "'");

      if (
    $template_query->RecordCount() > 0) {
        
    $template_dir $template_query->fields['template_dir'];
      }

    //  define('DIR_WS_TEMPLATE_IMAGES', DIR_WS_CATALOG_TEMPLATE . $template_dir . '/images/');
      
    define('DIR_WS_TEMPLATE_IMAGES'DIR_WS_CATALOG_TEMPLATE 'template_default' '/images/');
      
    define('DIR_WS_TEMPLATE_ICONS'DIR_WS_TEMPLATE_IMAGES 'icons/');

      require(
    DIR_FS_CATALOG DIR_WS_CLASSES 'template_func.php');
      
    $template = new template_func(DIR_WS_TEMPLATE);

    /**
     * send the content charset "now" so that all content is impacted by it - this is important for non-english sites
     */
      
    header("Content-Type: text/html; charset=" CHARSET);

    ?>
    2 More issues:

    Warning: Cannot modify header information - headers already sent by (output started at /home/earthly/public_html/shop/admin/includes/languages/english/index.php:74) in /home/earthly/public_html/shop/admin/includes/init_includes/init_templates.php on line 36

    Warning: Cannot modify header information - headers already sent by (output started at /home/earthly/public_html/shop/admin/includes/languages/english/index.php:74) in /home/earthly/public_html/shop/admin/includes/functions/general.php on line 21

    Thanks everyone!

  3. #3
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected ';' in /home/earthly/public_html/shop/admin

    if you modified english/index.php

    make sure you didn't add extra space before <?php and after ?>

    make sure you didn't forget single quote in your define() ..
    make sure all define() are ended with ;

  4. #4
    Join Date
    Jul 2008
    Posts
    17
    Plugin Contributions
    0

    Default Re: Parse error: syntax error, unexpected ';' in admin/includes/init_includes/init_te

    Thanks tony_sar.

    I contacted my web host, they did it all for me

 

 

Similar Threads

  1. Replies: 20
    Last Post: 21 Nov 2010, 02:48 AM
  2. Install: Parse error: syntax error, unexpected '/' in /includes/application_top.php
    By dlucarelli in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 26 Aug 2010, 02:08 PM
  3. Replies: 9
    Last Post: 5 Feb 2010, 01:12 AM
  4. Replies: 4
    Last Post: 30 Aug 2009, 09:26 PM
  5. Replies: 6
    Last Post: 7 Dec 2007, 03:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR