Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    279
    Plugin Contributions
    4

    Default zc_install blank screen

    Hi

    I've actually been running 1.5.1 for a while now and finally am upgrading to 1.5.4.

    I successfully made my upgrades using WAMP but now want to push the upgrades to my host. Obviously I need to run zc_install on my host now simply to upgrade the database.

    But when I run zc_install on my host I get a blank screen and this log file -

    [12-May-2015 06:38:24 UTC] PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /xxx/zc_install/includes/application_top.php on line 59
    [12-May-2015 06:38:24 UTC] PHP Fatal error: Uncaught exception 'RedisException' with message 'Connection closed' in /xxx/zc_install/includes/functions/sessions.php:92
    Stack trace:
    #0 /xxx/zc_install/includes/functions/sessions.php(92): session_start()
    #1 /xxx/zc_install/includes/application_top.php(139): zen_session_start()
    #2 /xxx/zc_install/index.php(46): require('/clientdata/n52...')
    #3 {main}
    thrown in /xxx/zc_install/includes/functions/sessions.php on line 92
    [12-May-2015 06:38:24 UTC] PHP Fatal error: Uncaught exception 'RedisException' with message 'Connection closed' in [no active file]:0
    Stack trace:
    #0 {main}
    thrown in [no active file] on line 0


    any ideas?

  2. #2
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: zc_install blank screen

    Quote Originally Posted by royaldave View Post
    ... PHP Warning: date_default_timezone_get() ...
    This means your hosting provider has not configured a default timezone for PHP (or has configured an incorrect timezone). PHP functions working with dates and / or times use this setting (or they do not know what timezone to apply by default if none is specified).

    There are a number of threads here on the forums about this message... Basically the best fix is to edit PHP configuration (php.ini) and add the correct setting for "date.timezone". If the hosting provider does not allow modifying the "php.ini", sometimes they allow changes via .htaccess files (would need to check with hosting provider for specifics).

    Personally, I dislike hosting providers where I cannot make minor modifications to PHP settings (within reason)... But if the hosting provider does not (and you are running PHP 5.3 or newer), in Zen Cart 1.5.4 there is a file you can edit: "/includes/extra_configures/set_time_zone.php". The file contains instructions on what to edit (and is run by the normal Zen Cart startup once installation is complete).


    Quote Originally Posted by royaldave View Post
    ... PHP Fatal error: Uncaught exception 'RedisException' with message 'Connection closed' in /xxx/zc_install/includes/functions/sessions.php:92 ...
    Sounds like the hosting provider has installed and configured phpredis for session storage. You can verify this by checking the values for "session.save_handler" and "session.save_path" in the output from "phpinfo()".


    If the hosting provider has installed and configured phpredis for session storage... May not be the "right" fix, but can you try the following (changes in red):


    Edit "/zc_install/includes/application_top.php" starting around line 122.
    Code:
    /**
     * set the session name and save path
     */
    zen_session_name('zenInstallId');
    if(ini_get('session.save_handler') == 'files') {
      zen_session_save_path(SESSION_WRITE_DIRECTORY);
    }
    Edit "/includes/init_includes/init_sessions.php" starting around line 29.
    Code:
    /**
     * set the session name and save path
     */
    zen_session_name('zenid');
    if(ini_get('session.save_handler') == 'files') {
      zen_session_save_path(SESSION_WRITE_DIRECTORY);
    }
    Edit "/admin/includes/init_includes/init_sessions.php" starting around line 15.
    Code:
      zen_session_name('zenAdminID');
      if(ini_get('session.save_handler') == 'files') {
        zen_session_save_path(SESSION_WRITE_DIRECTORY);
      }
    Last edited by lhungil; 12 May 2015 at 09:44 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  3. #3
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    279
    Plugin Contributions
    4

    Default Re: zc_install blank screen

    Thanks, I added the timezone stuff to .htaccess and all good.

    I also updated application_top.php and this appears to have solved the problem although I haven't completed my upgrade yet so will see if I get through the whole thing.

    I have not yet made the other changes you recommend because the website itself appears to work fine - I've tested the code against the un-updated database and all appears fine.

    Given that I've run 1.5.1 on the same host with no issues for a long time is it possible that this phpredis issue only affects the installer and not zencart itself ?

  4. #4
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: zc_install blank screen

    Quote Originally Posted by royaldave View Post
    Thanks, I added the timezone stuff to .htaccess and all good. ...


    Quote Originally Posted by royaldave View Post
    ... I also updated application_top.php and this appears to have solved the problem although I haven't completed my upgrade yet so will see if I get through the whole thing.

    I have not yet made the other changes you recommend because the website itself appears to work fine - I've tested the code against the un-updated database and all appears fine.

    Given that I've run 1.5.1 on the same host with no issues for a long time is it possible that this phpredis issue only affects the installer and not zencart itself ?
    Glad it worked for you! Looking back through the core Zen Cart code and the Zen Cart installer code... You are right and only the installer is affected (and only "/zc_install/includes/application_top.php" needs to be modified to mitigate this bug if encountered).


    The core Zen Cart 1.5.x code no longer uses STORE_SESSIONS at all (and always forces the use of custom db storage for sessions)... So basically, changing the SESSION_WRITE_DIRECTORY is probably completely unnecessary in the core files "init_sessions.php" (and can be safely commented out / removed - or left alone without any major impacts).

    The Zen Cart 1.5.x installer code does still reference STORE_SESSIONS... But ONLY adds a custom storage handler when STORE_SESSION == 'db'... And in most cases line 120 of "application_top.php" will set STORE_SESSIONS to 'file', but then does not create a custom storage handler (file based) in "sessions.php"... The code on line 126 of "application_top.php" then assumes file based storage is being used and changes the path to session storage to the SESSION_WRITE_DIRECTORY... Which breaks systems not using the session storage handler "files"...
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. v154 after upgrade only get the zc_install screen
    By delia in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 7 Jul 2015, 11:19 PM
  2. v154 Blank Screen After Upgrade (fixed) but now blank screen after login!
    By Kias Henry in forum Upgrading to 1.5.x
    Replies: 6
    Last Post: 23 Jun 2015, 07:32 PM
  3. Oops screen disallowing the zc_install to upgrade database.
    By notageek in forum Upgrading from 1.3.x to 1.3.9
    Replies: 8
    Last Post: 19 Nov 2010, 04:44 AM
  4. zc_install not starting, only getting blank screen
    By PerryAndrews in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 2 Aug 2010, 08:46 PM
  5. Blank Page During INSTALL (ZC_INSTALL)
    By nora_amora in forum Installing on a Windows Server
    Replies: 0
    Last Post: 29 Apr 2008, 08:11 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