Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2005
    Posts
    33
    Plugin Contributions
    0

    Default My Website not Loading!!

    Hello,
    My site has not been loading since past 2 days. On contacting the Hosting Customer care they provided with the following error report:
    PHP Parse error: syntax error, unexpected '(', expecting ',' or ';' in ./admin/includes/classes/sessions.php on line 44
    The Line is :

    var $cookie_path = substr(DIR_WS_ADMIN, 0, -1);

    Part code of the site:
    Code:
    /
    // +----------------------------------------------------------------------+
    // |zen-cart Open Source E-commerce                                       |
    // +----------------------------------------------------------------------+
    // | Copyright (c) 2003 The zen-cart developers                           |
    // |                                                                      |   
    // | http://www.zen-cart.com/index.php                                    |   
    // |                                                                      |   
    // | Portions Copyright (c) 2003 osCommerce                               |
    // +----------------------------------------------------------------------+
    // | This source file is subject to version 2.0 of the GPL license,       |
    // | that is bundled with this package in the file LICENSE, and is        |
    // | available through the world-wide-web at the following url:           |
    // | http://www.zen-cart.com/license/2_0.txt.                             |
    // | If you did not receive a copy of the zen-cart license and are unable |
    // | to obtain it through the world-wide-web, please send a note to       |
    // | [email protected] so we can mail you a copy immediately.          |
    // +----------------------------------------------------------------------+
    //  $Id: sessions.php 1969 2005-09-13 06:57:21Z drbyte $
    //
    /*
      Original source from Web Application Development with PHP (Tobias Ratschiller, Till Gerken)
      Copyright (c) 2000, New Riders Publishing
    */
    
      $SID = '';
    
      class php3session {
        var $name = PHP_SESSION_NAME;
        var $auto_start = false;
        var $referer_check = false;
    
        var $save_path = PHP_SESSION_SAVE_PATH;
        var $save_handler = 'php3session_files';
    
        var $lifetime = 0;
    
        var $cache_limiter = 'nocache';
        var $cache_expire = 180;
    
        var $use_cookies = true;
        var $cookie_lifetime = 0;
        var $cookie_path = substr(DIR_WS_ADMIN, 0, -1);
        var $cookie_domain = '';
    
        var $gc_probability = 1;
        var $gc_maxlifetime = 0;
    
        var $serialize_handler = 'php';
        var $ID;
    
        var $nr_open_sessions = 0;
        var $mod_name = '';
        var $id;
        var $delimiter = "\n";
        var $delimiter_value = '[==]';
    
        function php3session() {
          $this->mod_name = $this->save_handler;
        }
      }
    
      class php3session_user {
        var $open_func, $close_func, $read_func, $write_func, $destroy_func, $gc_func;
    
        function open($save_path, $sess_name) {
          $func = $this->open_func;
          if (function_exists($func)) {
            return $func($save_path, $sess_name);
          }
    
          return true;
        }
    
        function close($save_path, $sess_name) {
          $func = $this->close_func;
          if (function_exists($func)) {
            return $func();
          }
    
          return true;
        }
    
        function read($sess_id) {
          $func = $this->read_func;
    
          return $func($sess_id);
        }
    
        function write($sess_id, $val) {
          $func = $this->write_func;
    
          return $func($sess_id, $val);
        }
    
        function destroy($sess_id) {
          $func = $this->destroy_func;
          if (function_exists($func)) {
            return $func($sess_id);
          }
    
          return true;
        }
    
        function gc($max_lifetime) {
          $func = $this->gc_func;
          if (function_exists($func)) {
            return $func($max_lifetime);
          }
    
          return true;
        }
      }
    
      class php3session_files {
        function open($save_path, $sess_name) {
          return true;
        }
    
        function close() {
          return true;
        }
    
        function read($sess_id) {
          global $session;
    
    // Open, read in, close file with session data
          $file = $session->save_path . '/sess_' . $sess_id;
          if (!file_exists($file)) {
    // Create it
            touch($file);
          }
          $fp = fopen($file, 'r') or die('Could not open session file (' . $file . ').');
          $val = fread($fp, filesize($file));
          fclose($fp);
    
          return $val;
        }
    
        function write($sess_id, $val) {
          global $session;
    Please help regarding the same.
    If any more details are needed let me know.

    Regards,
    Aakash Shah
    www.spectglasses.com

  2. #2
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: My Website not Loading!!

    No idea how you get that file, but it doesnt seem to be in the default zencart.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  3. #3
    Join Date
    Aug 2005
    Posts
    33
    Plugin Contributions
    0

    Default Re: My Website not Loading!!

    Yes, I had installed it through Fantastico

  4. #4
    Join Date
    Oct 2006
    Posts
    5,477
    Plugin Contributions
    11

    Default Re: My Website not Loading!!

    DrByte will be able to answer your question in more details, but it is confirmed that the file is NOT in zencart default 1.3.8, or at least it does not exist at that specific location.
    Perhaps you have a very old version of Zencart, since it says php3 there? And now your host may have just upgraded their php version, which explains why you suddenly get the error.
    I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

  5. #5
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: My Website not Loading!!

    I do not recall Zen Cart ever having a php3session class.
    Someone has changed the contents of that file, because it's not part of any current version of Zen Cart. While they have a typical (older) Zen Cart copyright header in the top of the file, the rest of the file comes from something published by someone else, apparently New Riders Publishing.

    I recommend that you upgrade your site (manually) or delete the files you're presently using and install the current version ... manually, not using Fantastico.

    Naturally, make a backup of everything (files and database) first.

    And, as yellow said, talk to your hosting company about what THEY have changed on your server in the last 2 days.
    .
    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.

 

 

Similar Threads

  1. v153 Website not loading - blank page
    By GeoBew in forum General Questions
    Replies: 7
    Last Post: 12 Oct 2015, 11:06 PM
  2. v139h sky cloud problem: website not loading no data sent
    By thetrecker in forum General Questions
    Replies: 2
    Last Post: 2 Mar 2013, 10:15 AM
  3. v150 Slow website loading
    By oitem in forum Basic Configuration
    Replies: 13
    Last Post: 19 May 2012, 04:02 PM
  4. v139a Full website upload and a few pages not loading
    By J9MM0 in forum General Questions
    Replies: 4
    Last Post: 29 Feb 2012, 02:43 AM
  5. shop not loading or loading after long time.
    By geel in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 11 Jul 2011, 05:46 PM

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