Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2005
    Posts
    11
    Plugin Contributions
    0

    application error Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    Try to login to admin today, but face this error:

    Parse error: syntax error, unexpected T_IF in /home/xvqctdbk/public_html/flexguitars/shopfront/includes/functions/sessions.php on line 3


    this is my sessions.php:

    <?php/** * functions/sessions.php * Session functions * * @package functions * @copyright Copyright 2003-2005 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: sessions.php 3772 2006-06-13 18:51:58Z wilt $ */if (!defined
    ('IS_ADMIN_FLAG');) { die('Illegal Access');} if (STORE_SESSIONS == 'db')

    { if (defined('DIR_WS_ADMIN'))
    { if (!$SESS_LIFE = (SESSION_TIMEOUT_ADMIN + 900))
    { $SESS_LIFE = (SESSION_TIMEOUT_ADMIN + 900); } }
    else { if (!$SESS_LIFE = get_cfg_var
    ('session.gc_maxlifetime')) { $SESS_LIFE = 1440; } } function _sess_open($save_path, $session_name) { return true;
    } function _sess_close() { return true; } function _sess_read($key) { global $db; $qid = "select value from " .
    TABLE_SESSIONS . " where sesskey = '" . zen_db_input($key) . "' and expiry >


    can any one point what's wrong. Thanks in advance.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    You need to re-upload that file, as it's incomplete. It seems your FTP program must have mangled the file during initial upload.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Nov 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    Thanks, Dr Byte. Where can I get the original file from? I do not have a copy.

  4. #4
    Join Date
    Nov 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    The cart was operating okay until recently. And we did not touch the sessions.php file.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    Quote Originally Posted by flex_gui View Post
    The cart was operating okay until recently. And we did not touch the sessions.php file.
    Then ask your hosting company what's been happening on the server.
    What's the date/time stamp on that file?
    What version of Zen Cart are you using?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    Quote Originally Posted by flex_gui View Post
    Thanks, Dr Byte. Where can I get the original file from? I do not have a copy.
    Um ... you should *ALWAYS* have backups of the files that are on your server. As well as backups of your site's database content.
    You can backup the database using this FAQ: https://www.zen-cart.com/tutorials/i...hp?article=103
    You can backup your files using your FTP program to copy everything from the server to your PC.
    Might be wise to burn backups to CD periodically.


    You can get original files for every released version of Zen Cart here: http://sourceforge.net/project/showf...group_id=83781
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Nov 2005
    Posts
    11
    Plugin Contributions
    0

    Default Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF

    Thanks, Dr Byte. I will check with the the hosting company on this and do the necessary backup...

 

 

Similar Threads

  1. 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
  2. Replies: 4
    Last Post: 30 Aug 2009, 09:26 PM
  3. Replies: 3
    Last Post: 15 Apr 2009, 03:23 PM
  4. Fatal Error - Cannot log into Admin Panel
    By featured in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 14 Aug 2008, 10:18 PM
  5. Parse error: syntax error, unexpected $end in /home/mindmint/www/www/admin/ezpages.ph
    By Paul R. - Mindmint in forum Customization from the Admin
    Replies: 1
    Last Post: 1 Nov 2006, 08:21 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