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.
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.
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.
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.
Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF
Quote:
Originally Posted by
flex_gui
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?
Re: Cannot Log into admin panel: Parse error: syntax error, unexpected T_IF
Quote:
Originally Posted by
flex_gui
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
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...