Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Blank page when loading admin

    The site is frenchpresents.com, PHP 5.3 Zen cart 1.5.5
    I got handed this because the customer lost their technical support for a while.
    On 11/30 they lost access to their admin page. I have traced it to the application_top in the admin includes.
    I backed up the files to 11/26 and get the same results.
    I put a bunch or echos in to find the area of the code. Here is the code
    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2016 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: Author: zcwilt  Mon Oct 19 18:21:05 2015 +0100 Modified in v1.5.5 $
     */
    /**
     * File contains just application_top code
     *
     * Initializes common classes & methods. Controlled by an array which describes
     * the elements to be initialised and the order in which that happens.
     *
     * @package admin
     */
    /**
     * boolean if true the autoloader scripts will be parsed and their output shown. For debugging purposes only.
     */
     echo "starting application top<br />";
    if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', true);
    define ('STRICT_ERROR_REPORTING', true);
    echo "after debug autoload<br />";
    /**
     * boolean used to see if we are in the admin script, obviously set to false here.
     * DO NOT REMOVE THE define BELOW. WILL BREAK ADMIN
     */
    define('IS_ADMIN_FLAG', true);
    /**
     * integer saves the time at which the script started.
     */
    // Start the clock for the page parse time log
    define('PAGE_PARSE_START_TIME', microtime());
    /**
     * set the level of error reporting
     *
     * Note STRICT_ERROR_REPORTING should never be set to true on a production site. <br />
     * It is mainly there to show php warnings during testing/bug fixing phases.<br />
     * note for strict error reporting we also turn on show_errors as this may be disabled<br />
     * in php.ini. Otherwise we respect the php.ini setting
     *
     */
    if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
      @ini_set('display_errors', TRUE);
      error_reporting(version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 5.4, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);
    } else {
      error_reporting(0);
    }
    echo "after error reoporting<br />";
    /*
     * turn off magic-quotes support, for both runtime and sybase, as both will cause problems if enabled
     */
    if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);
    if (version_compare(PHP_VERSION, 5.4, '<') && @ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);
    // set php_self in the local scope
    if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF'];
    $PHP_SELF = htmlspecialchars($PHP_SELF);
    // Suppress html from error messages
    @ini_set("html_errors","0");
    /*
     * Get time zone info from PHP config
    */
    if (version_compare(PHP_VERSION, 5.3, '>='))
    {
      @date_default_timezone_set(date_default_timezone_get());
    }
    
    if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
    if (!defined('DIR_FS_ADMIN')) define('DIR_FS_ADMIN', preg_replace('#/includes/$#', '/', realpath(__DIR__ . '/../') . '/'));
    
    /**
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      /**
       * load any local(user created) configure file.
       */
      include('includes/local/configure.php');
    }
    /**
     * check for and load application configuration parameters
     */
    if (file_exists('includes/configure.php')) {
      /**
       * load the main configure file.
       */
      include('includes/configure.php');
    }
    if (!defined('DIR_FS_CATALOG') || !is_dir(DIR_FS_CATALOG.'/includes/classes') || !defined('DB_TYPE') || DB_TYPE == '') {
      if (file_exists('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php')) {
        require('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php');
        exit;
      } elseif (file_exists('../zc_install/index.php')) {
        echo 'ERROR: Admin configure.php not found. Suggest running install? <a href="../zc_install/index.php">Click here for installation</a>';
      } else {
        die('ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?');
      }
    }
    /**
     * check for and load system defined path constants
     */
    if (file_exists('includes/defined_paths.php')) {
        /**
         * load the system-defined path constants
         */
        require('includes/defined_paths.php');
    } else {
        die('ERROR: /includes/defined_paths.php file not found. Cannot continue.');
        exit;
    }
    /**
     * ignore version-check if INI file setting has been set
     */
    if (file_exists(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini')) {
      $lines = @file(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini');
      if (is_array($lines)) {
        foreach($lines as $line) {
          if (substr($line,0,14)=='admin_configure_php_check=') $check_cfg=substr(trim(strtolower(str_replace('admin_configure_php_check=','',$line))),0,3);
        }
      }
    }
    /*
    // turned off for now
      if ($check_cfg != 'off') {
        // if the admin/includes/configure.php file doesn't contain admin-related content, throw error
        $zc_pagepath = str_replace(basename($PHP_SELF),'',__FILE__); //remove page name from full path of current page
        $zc_pagepath = str_replace(array('\\','\\\\'),'/',$zc_pagepath); // convert '\' marks to '/'
        $zc_pagepath = str_replace('//','/',$zc_pagepath); //convert doubles to single
        $zc_pagepath = str_replace(strrchr($zc_pagepath,'/'),'',$zc_pagepath); // remove trailing '/'
        $zc_adminpage = str_replace('\\','/',DIR_FS_ADMIN); //convert "\" to '/'
        $zc_adminpage = str_replace('//','/',$zc_adminpage); // remove doubles
        $zc_adminpage = str_replace(strrchr($zc_adminpage,'/'),'',$zc_adminpage); // remove trailing '/'
        if (!defined('DIR_WS_ADMIN') || $zc_pagepath != $zc_adminpage ) {
          echo ('ERROR: The admin/includes/configure.php file has invalid configuration. Please rebuild, or verify specified paths.');
          if (file_exists('../zc_install/index.php')) {
            echo '<br /><a href="../zc_install/index.php">Click here for installation</a>';
          }
          echo '<br /><br /><br /><br />['.$zc_pagepath.']&nbsp;&nbsp;&nbsp;&laquo;&raquo;&nbsp;&nbsp;&nbsp;[' .$zc_adminpage.']<br />';
        }
      }
    */
    /**
     * include the list of extra configure files
     */
     echo "before Includes <br />";
    if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) {
      while ($zv_file = $za_dir->read()) {
          echo "in includes before preg_match <br />";
        if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
          /**
           * load any user/contribution specific configuration files.
           */
          include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file);
          $Peters=DIR_WS_INCLUDES . 'extra_configures/' . $zv_file;
          echo "$Peters"."<br/>";
        }
        
      }
      echo "after while statement in extra includes<br />";
      $za_dir->close();
    }
    /**
     * init some vars
     */
    $template_dir = '';
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    /**
     * Prepare init-system
     */
    $autoLoadConfig = array();
    if (isset($loaderPrefix)) {
     $loaderPrefix = preg_replace('/[^a-z_]/', '', $loaderPrefix);
    } else {
      $loaderPrefix = 'config';
    }
    $loader_file = $loaderPrefix . '.core.php';
    require('includes/initsystem.php');
    /**
     * load the autoloader interpreter code.
     */
      require(DIR_FS_CATALOG . 'includes/autoload_func.php');

    It gives these results
    This is a testloading confiruation fileconfiguration file loadedafter version checkbefore extra configuresin zv_filein zv_filein zv_file
    in extra Configs
    includes/extra_configures/email_use_8bit.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/enable_error_logging.php
    after DIR_WS_INCLUDESin zv_filein zv_file
    in extra Configs
    includes/extra_configures/media_manager.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/security_patch_v138_20090619.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/use_catalog_time_zone.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_image_handler_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_io_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs

    Where should I look now
    Is it wise to give the path to the loving folder

  2. #2
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Login Page blank

    My client lost their regular tech support, so I am combining in the middle of this. Any comment appreciated. Let me know if I have to supply anything else.

    php version 5.3
    www.frenchpresents.com
    zc version 155
    On November 30, my client login in the AM to print an invoice. In the afternoon the login page was blank. I restored the the as of the weekend before, and still have the same problem. This is on a Linux server at go daddy, and they say they made no changes. I also ran a database backup and repair just see if anything happens. The problem appears to be in the admins application_top.php. I put in several echos, to trace the problem and it appears to be here.
    Code:
     * include the list of extra configure files
     */
     echo "before Includes <br />";
    if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) {
      while ($zv_file = $za_dir->read()) {
          echo "in includes before preg_match <br />";
        if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
          /**
           * load any user/contribution specific configuration files.
           */
          include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file);
          $Peters=DIR_WS_INCLUDES . 'extra_configures/' . $zv_file;
          echo "$Peters"."<br/>";
        }
        
      }
      echo "after while statement in extra includes<br />";
      $za_dir->close();
    }
    This produced this output
    This is a testloading confiruation fileconfiguration file loadedafter version checkbefore extra configuresin zv_filein zv_filein zv_file
    in extra Configs
    includes/extra_configures/email_use_8bit.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/enable_error_logging.php
    after DIR_WS_INCLUDESin zv_filein zv_file
    in extra Configs
    includes/extra_configures/media_manager.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/security_patch_v138_20090619.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/use_catalog_time_zone.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_image_handler_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_io_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs

    The files in the extra configures are:
    Click image for larger version. 

Name:	Screen Shot 2017-12-04 at 5.52.35 AM.png 
Views:	17 
Size:	56.2 KB 
ID:	17502
    Full code follows
    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2016 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: Author: zcwilt  Mon Oct 19 18:21:05 2015 +0100 Modified in v1.5.5 $
     */
    /**
     * File contains just application_top code
     *
     * Initializes common classes & methods. Controlled by an array which describes
     * the elements to be initialised and the order in which that happens.
     *
     * @package admin
     */
    /**
     * boolean if true the autoloader scripts will be parsed and their output shown. For debugging purposes only.
     */
     echo "starting application top<br />";
    if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', true);
    define ('STRICT_ERROR_REPORTING', true);
    echo "after debug autoload<br />";
    /**
     * boolean used to see if we are in the admin script, obviously set to false here.
     * DO NOT REMOVE THE define BELOW. WILL BREAK ADMIN
     */
    define('IS_ADMIN_FLAG', true);
    /**
     * integer saves the time at which the script started.
     */
    // Start the clock for the page parse time log
    define('PAGE_PARSE_START_TIME', microtime());
    /**
     * set the level of error reporting
     *
     * Note STRICT_ERROR_REPORTING should never be set to true on a production site. <br />
     * It is mainly there to show php warnings during testing/bug fixing phases.<br />
     * note for strict error reporting we also turn on show_errors as this may be disabled<br />
     * in php.ini. Otherwise we respect the php.ini setting
     *
     */
    if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
      @ini_set('display_errors', TRUE);
      error_reporting(version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 5.4, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);
    } else {
      error_reporting(0);
    }
    echo "after error reoporting<br />";
    /*
     * turn off magic-quotes support, for both runtime and sybase, as both will cause problems if enabled
     */
    if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);
    if (version_compare(PHP_VERSION, 5.4, '<') && @ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);
    // set php_self in the local scope
    if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF'];
    $PHP_SELF = htmlspecialchars($PHP_SELF);
    // Suppress html from error messages
    @ini_set("html_errors","0");
    /*
     * Get time zone info from PHP config
    */
    if (version_compare(PHP_VERSION, 5.3, '>='))
    {
      @date_default_timezone_set(date_default_timezone_get());
    }
    
    if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
    if (!defined('DIR_FS_ADMIN')) define('DIR_FS_ADMIN', preg_replace('#/includes/$#', '/', realpath(__DIR__ . '/../') . '/'));
    
    /**
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      /**
       * load any local(user created) configure file.
       */
      include('includes/local/configure.php');
    }
    /**
     * check for and load application configuration parameters
     */
    if (file_exists('includes/configure.php')) {
      /**
       * load the main configure file.
       */
      include('includes/configure.php');
    }
    if (!defined('DIR_FS_CATALOG') || !is_dir(DIR_FS_CATALOG.'/includes/classes') || !defined('DB_TYPE') || DB_TYPE == '') {
      if (file_exists('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php')) {
        require('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php');
        exit;
      } elseif (file_exists('../zc_install/index.php')) {
        echo 'ERROR: Admin configure.php not found. Suggest running install? <a href="../zc_install/index.php">Click here for installation</a>';
      } else {
        die('ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?');
      }
    }
    /**
     * check for and load system defined path constants
     */
    if (file_exists('includes/defined_paths.php')) {
        /**
         * load the system-defined path constants
         */
        require('includes/defined_paths.php');
    } else {
        die('ERROR: /includes/defined_paths.php file not found. Cannot continue.');
        exit;
    }
    /**
     * ignore version-check if INI file setting has been set
     */
    if (file_exists(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini')) {
      $lines = @file(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini');
      if (is_array($lines)) {
        foreach($lines as $line) {
          if (substr($line,0,14)=='admin_configure_php_check=') $check_cfg=substr(trim(strtolower(str_replace('admin_configure_php_check=','',$line))),0,3);
        }
      }
    }
    /*
    // turned off for now
      if ($check_cfg != 'off') {
        // if the admin/includes/configure.php file doesn't contain admin-related content, throw error
        $zc_pagepath = str_replace(basename($PHP_SELF),'',__FILE__); //remove page name from full path of current page
        $zc_pagepath = str_replace(array('\\','\\\\'),'/',$zc_pagepath); // convert '\' marks to '/'
        $zc_pagepath = str_replace('//','/',$zc_pagepath); //convert doubles to single
        $zc_pagepath = str_replace(strrchr($zc_pagepath,'/'),'',$zc_pagepath); // remove trailing '/'
        $zc_adminpage = str_replace('\\','/',DIR_FS_ADMIN); //convert "\" to '/'
        $zc_adminpage = str_replace('//','/',$zc_adminpage); // remove doubles
        $zc_adminpage = str_replace(strrchr($zc_adminpage,'/'),'',$zc_adminpage); // remove trailing '/'
        if (!defined('DIR_WS_ADMIN') || $zc_pagepath != $zc_adminpage ) {
          echo ('ERROR: The admin/includes/configure.php file has invalid configuration. Please rebuild, or verify specified paths.');
          if (file_exists('../zc_install/index.php')) {
            echo '<br /><a href="../zc_install/index.php">Click here for installation</a>';
          }
          echo '<br /><br /><br /><br />['.$zc_pagepath.']&nbsp;&nbsp;&nbsp;&laquo;&raquo;&nbsp;&nbsp;&nbsp;[' .$zc_adminpage.']<br />';
        }
      }
    */
    /**
     * include the list of extra configure files
     */
     echo "before Includes <br />";
    if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) {
      while ($zv_file = $za_dir->read()) {
          echo "in includes before preg_match <br />";
        if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
          /**
           * load any user/contribution specific configuration files.
           */
          include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file);
          $Peters=DIR_WS_INCLUDES . 'extra_configures/' . $zv_file;
          echo "$Peters"."<br/>";
        }
        
      }
      echo "after while statement in extra includes<br />";
      $za_dir->close();
    }
    /**
     * init some vars
     */
    $template_dir = '';
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    /**
     * Prepare init-system
     */
    $autoLoadConfig = array();
    if (isset($loaderPrefix)) {
     $loaderPrefix = preg_replace('/[^a-z_]/', '', $loaderPrefix);
    } else {
      $loaderPrefix = 'config';
    }
    $loader_file = $loaderPrefix . '.core.php';
    require('includes/initsystem.php');
    /**
     * load the autoloader interpreter code.
     */
      require(DIR_FS_CATALOG . 'includes/autoload_func.php');

  3. #3
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Login page turned blank

    I have just taken a project where the original tech is not avialable.
    On Nov. 30 the client logged in the admin in the AM to print an invoice.
    In the PM the login page was blank. THis is a GoDaddy Linux system.
    Godaddy says they made no change.
    ZC version 155
    PHP 5.3
    url http://www.frenchpresents.com

    I have traced the problem to the application_top.php. I put echo statements in to trace the error, and the problem is in extra_configuration.
    Since I have having trouble getting this post to stick, I am going to do a reply to give more info

  4. #4
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Login page turned blank

    As I said previous the problem is in application_top.php for the admin. Here is the section of code that is applicable.
    Code:
     * include the list of extra configure files
     */
     echo "before Includes <br />";
    if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) {
      while ($zv_file = $za_dir->read()) {
          echo "in includes before preg_match <br />";
        if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
          /**
           * load any user/contribution specific configuration files.
           */
          include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file);
          $Peters=DIR_WS_INCLUDES . 'extra_configures/' . $zv_file;
          echo "$Peters"."<br/>";
        }
        
      }
      echo "after while statement in extra includes<br />";
      $za_dir->close();
    }
    It gives these results
    This is a testloading confiruation fileconfiguration file loadedafter version checkbefore extra configuresin zv_filein zv_filein zv_file
    in extra Configs
    includes/extra_configures/email_use_8bit.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/enable_error_logging.php
    after DIR_WS_INCLUDESin zv_filein zv_file
    in extra Configs
    includes/extra_configures/media_manager.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/security_patch_v138_20090619.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/use_catalog_time_zone.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_image_handler_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs
    includes/extra_configures/bmz_io_conf.php
    after DIR_WS_INCLUDESin zv_file
    in extra Configs

    Full code in next reply

  5. #5
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Login page turned blank

    here is the full code
    Code:
    <?php
    /**
     * @package admin
     * @copyright Copyright 2003-2016 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: Author: zcwilt  Mon Oct 19 18:21:05 2015 +0100 Modified in v1.5.5 $
     */
    /**
     * File contains just application_top code
     *
     * Initializes common classes & methods. Controlled by an array which describes
     * the elements to be initialised and the order in which that happens.
     *
     * @package admin
     */
    /**
     * boolean if true the autoloader scripts will be parsed and their output shown. For debugging purposes only.
     */
     echo "starting application top<br />";
    if (!defined('DEBUG_AUTOLOAD')) define('DEBUG_AUTOLOAD', true);
    define ('STRICT_ERROR_REPORTING', true);
    echo "after debug autoload<br />";
    /**
     * boolean used to see if we are in the admin script, obviously set to false here.
     * DO NOT REMOVE THE define BELOW. WILL BREAK ADMIN
     */
    define('IS_ADMIN_FLAG', true);
    /**
     * integer saves the time at which the script started.
     */
    // Start the clock for the page parse time log
    define('PAGE_PARSE_START_TIME', microtime());
    /**
     * set the level of error reporting
     *
     * Note STRICT_ERROR_REPORTING should never be set to true on a production site. <br />
     * It is mainly there to show php warnings during testing/bug fixing phases.<br />
     * note for strict error reporting we also turn on show_errors as this may be disabled<br />
     * in php.ini. Otherwise we respect the php.ini setting
     *
     */
    if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
      @ini_set('display_errors', TRUE);
      error_reporting(version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 5.4, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);
    } else {
      error_reporting(0);
    }
    echo "after error reoporting<br />";
    /*
     * turn off magic-quotes support, for both runtime and sybase, as both will cause problems if enabled
     */
    if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);
    if (version_compare(PHP_VERSION, 5.4, '<') && @ini_get('magic_quotes_sybase') != 0) @ini_set('magic_quotes_sybase', 0);
    // set php_self in the local scope
    if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF'];
    $PHP_SELF = htmlspecialchars($PHP_SELF);
    // Suppress html from error messages
    @ini_set("html_errors","0");
    /*
     * Get time zone info from PHP config
    */
    if (version_compare(PHP_VERSION, 5.3, '>='))
    {
      @date_default_timezone_set(date_default_timezone_get());
    }
    
    if (!defined('__DIR__')) define('__DIR__', dirname(__FILE__));
    if (!defined('DIR_FS_ADMIN')) define('DIR_FS_ADMIN', preg_replace('#/includes/$#', '/', realpath(__DIR__ . '/../') . '/'));
    
    /**
     * Set the local configuration parameters - mainly for developers
     */
    if (file_exists('includes/local/configure.php')) {
      /**
       * load any local(user created) configure file.
       */
      include('includes/local/configure.php');
    }
    /**
     * check for and load application configuration parameters
     */
    if (file_exists('includes/configure.php')) {
      /**
       * load the main configure file.
       */
      include('includes/configure.php');
    }
    if (!defined('DIR_FS_CATALOG') || !is_dir(DIR_FS_CATALOG.'/includes/classes') || !defined('DB_TYPE') || DB_TYPE == '') {
      if (file_exists('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php')) {
        require('../includes/templates/template_default/templates/tpl_zc_install_suggested_default.php');
        exit;
      } elseif (file_exists('../zc_install/index.php')) {
        echo 'ERROR: Admin configure.php not found. Suggest running install? <a href="../zc_install/index.php">Click here for installation</a>';
      } else {
        die('ERROR: admin/includes/configure.php file not found. Suggest running zc_install/index.php?');
      }
    }
    /**
     * check for and load system defined path constants
     */
    if (file_exists('includes/defined_paths.php')) {
        /**
         * load the system-defined path constants
         */
        require('includes/defined_paths.php');
    } else {
        die('ERROR: /includes/defined_paths.php file not found. Cannot continue.');
        exit;
    }
    /**
     * ignore version-check if INI file setting has been set
     */
    if (file_exists(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini')) {
      $lines = @file(DIR_FS_ADMIN . 'includes/local/skip_version_check.ini');
      if (is_array($lines)) {
        foreach($lines as $line) {
          if (substr($line,0,14)=='admin_configure_php_check=') $check_cfg=substr(trim(strtolower(str_replace('admin_configure_php_check=','',$line))),0,3);
        }
      }
    }
    /*
    // turned off for now
      if ($check_cfg != 'off') {
        // if the admin/includes/configure.php file doesn't contain admin-related content, throw error
        $zc_pagepath = str_replace(basename($PHP_SELF),'',__FILE__); //remove page name from full path of current page
        $zc_pagepath = str_replace(array('\\','\\\\'),'/',$zc_pagepath); // convert '\' marks to '/'
        $zc_pagepath = str_replace('//','/',$zc_pagepath); //convert doubles to single
        $zc_pagepath = str_replace(strrchr($zc_pagepath,'/'),'',$zc_pagepath); // remove trailing '/'
        $zc_adminpage = str_replace('\\','/',DIR_FS_ADMIN); //convert "\" to '/'
        $zc_adminpage = str_replace('//','/',$zc_adminpage); // remove doubles
        $zc_adminpage = str_replace(strrchr($zc_adminpage,'/'),'',$zc_adminpage); // remove trailing '/'
        if (!defined('DIR_WS_ADMIN') || $zc_pagepath != $zc_adminpage ) {
          echo ('ERROR: The admin/includes/configure.php file has invalid configuration. Please rebuild, or verify specified paths.');
          if (file_exists('../zc_install/index.php')) {
            echo '<br /><a href="../zc_install/index.php">Click here for installation</a>';
          }
          echo '<br /><br /><br /><br />['.$zc_pagepath.']&nbsp;&nbsp;&nbsp;&laquo;&raquo;&nbsp;&nbsp;&nbsp;[' .$zc_adminpage.']<br />';
        }
      }
    */
    /**
     * include the list of extra configure files
     */
     echo "before Includes <br />";
    if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_configures')) {
      while ($zv_file = $za_dir->read()) {
          echo "in includes before preg_match <br />";
        if (preg_match('~^[^\._].*\.php$~i', $zv_file) > 0) {
          /**
           * load any user/contribution specific configuration files.
           */
          include(DIR_WS_INCLUDES . 'extra_configures/' . $zv_file);
          $Peters=DIR_WS_INCLUDES . 'extra_configures/' . $zv_file;
          echo "$Peters"."<br/>";
        }
        
      }
      echo "after while statement in extra includes<br />";
      $za_dir->close();
    }
    /**
     * init some vars
     */
    $template_dir = '';
    define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
    /**
     * Prepare init-system
     */
    $autoLoadConfig = array();
    if (isset($loaderPrefix)) {
     $loaderPrefix = preg_replace('/[^a-z_]/', '', $loaderPrefix);
    } else {
      $loaderPrefix = 'config';
    }
    $loader_file = $loaderPrefix . '.core.php';
    require('includes/initsystem.php');
    /**
     * load the autoloader interpreter code.
     */
      require(DIR_FS_CATALOG . 'includes/autoload_func.php');

  6. #6
    Join Date
    Dec 2017
    Location
    MN USA
    Posts
    10
    Plugin Contributions
    0

    Default Re: Login page turned blank

    Here are the files in extra configurationClick image for larger version. 

Name:	Screen Shot 2017-12-04 at 5.52.35 AM.png 
Views:	19 
Size:	56.2 KB 
ID:	17503

  7. #7
    Join Date
    Jul 2012
    Posts
    11,630
    Plugin Contributions
    13

    Default Re: Login page turned blank

    Quote Originally Posted by ajohnpeters View Post
    Here are the files in extra configurationClick image for larger version. 

Name:	Screen Shot 2017-12-04 at 5.52.35 AM.png 
Views:	19 
Size:	56.2 KB 
ID:	17503
    While it would have been a little easier to have also included a check of what file was being loaded "before" so that a before/after pairing could have been seen, the issue is likely identified in the logs directory of having loaded duplicate content related to the file: "bmz_io_conf_old.php"... when attempting to "hide" files or not have them load any more at least with many places in ZC, the file's extension must also be changed. Because it ends with .php in this directory anyways, it is loaded and probably contains content that has already been loaded and therefore causing a problem...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  8. #8
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    6,979
    Plugin Contributions
    63

    Default Re: Login page turned blank

    Quote Originally Posted by mc12345678 View Post
    While it would have been a little easier to have also included a check of what file was being loaded "before" so that a before/after pairing could have been seen, the issue is likely identified in the logs directory of having loaded duplicate content related to the file: "bmz_io_conf_old.php"... when attempting to "hide" files or not have them load any more at least with many places in ZC, the file's extension must also be changed. Because it ends with .php in this directory anyways, it is loaded and probably contains content that has already been loaded and therefore causing a problem...
    Exactly! The issue is most likely that both bmz_io_conf_old.php and bmz_io_conf.php are being loaded and, most likely, re-defining a function ... resulting in a PHP error.

    Just rename bmz_io_conf_old.php to bmz_io_conf.php~and that issue should disappear.

  9. #9
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    6,342
    Plugin Contributions
    8

    Default Re: Login page turned blank

    No method is the ultimate way to rename a file you might want to keep for further reference. lat9s adding of the tilde ~ works but might not always be acceptable or searchable. Doesn't mean it's wrong.
    Another way is to change the .php to your intials. As long as you are not John Paul Getty, Georgia Iris Fenwick, or Paula Nancy Gettings -- you should not have a problem. And searching for .drb is always going to be specific.
    Of course, .bak is a big no-no.

  10. #10
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    6,342
    Plugin Contributions
    8

    Default Re: Login Page blank

    Answered elsewhere in another thread. Renaming something.php to something_old.php will result in the something_old.php STILL loading and butting heads with the new something.php

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Blank page when I go to admin
    By terry thompson in forum General Questions
    Replies: 5
    Last Post: 3 Dec 2012, 03:45 PM
  2. Intermittent Blank Page when loading v1.3.9h
    By wildblueman in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 24 Dec 2010, 12:34 AM
  3. admin not loading - checkout to blank page
    By kdogg in forum General Questions
    Replies: 9
    Last Post: 13 Oct 2010, 09:00 AM
  4. Error when loading admin page
    By iamperez247 in forum General Questions
    Replies: 1
    Last Post: 19 Mar 2008, 02:55 PM

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