Zen Cart Logo
Forums / Bug Reports / [Not a Bug] V1.39h Application_top error in code

[Not a Bug] V1.39h Application_top error in code

Views: 952

Results 1 to 2 of 2
4 Aug 2011, 2:43 AM
#1
calderwood avatar

calderwood

New Zenner

Join Date:
May 2010
Posts:
5
Plugin Contributions:
0

[Not a Bug] V1.39h Application_top error in code

We have a fresh install of 1.39h and about every few days the Zen Install page will appear and stop the store. The admin panel is not affected, just the store. The first to times I ended up re-installing, but the third time I searched and found an error in the code. The application.php file has a config section that is checking for the configure.php in two locations on the server, but the second location does not contain a config file. I placed a copy of the configure.php in the folder and it now works. The folder it looks fore is includes/local/configure.php

This is the bad code after * determine install status:

CODE BELOW IS FROM LINE 141 DOWN.

/**

  • determine install status
    */
    if (((!file_exists('includes/configure.php') && !file_exists('includes/local/configure.php')) || (DB_TYPE == '') || (!file_exists('includes/classes/db/' .DB_TYPE . '/query_factory.php')) || !file_exists('includes/autoload_func.php')) {
    $problemString = 'includes/configure.php file empty or file not found, OR wrong DB_TYPE set, OR cannot find includes/autoload_func.php which suggests paths are wrong or files were not uploaded correctly';
    require('includes/templates/template_default/templates/tpl_zc_install_suggested_default.php');
    header('location: zc_install/index.php');
    exit;
    }
4 Aug 2011, 2:52 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: [Not a Bug] V1.39h Application_top error in code

Um, that's not a bug. It's specifically designed to look for that "local" file so that you can have simpler setups for local-server-testing vs your live-server operation.

Whatever problems you're having are not caused by the lack of an /includes/local/configure.php file being present on your server.
That file should not be present under normal production/server circumstances. And, if it is present, Zen Cart will use it. If it's not present, then it won't use it.

You'll notice that the code already contains safeties to check for the file's existence before it even tries to load the file, so that protects its non-existence from causing any problems.

As far as configure.php files are concerned, that section of code will only trigger the "need to install" message if BOTH configure.php files don't exist. So, your problem has nothing to do with an /includes/local/configure.php file. Rather, your problem would be that your MAIN configure.php file is not present or has permissions so low that it can't be read, or perhaps one of the other 2 conditions that line of code checks for are failing for some reason, all of which indicate that your main configuration setup is damaged and a reinstall is appropriate ... or a restore from backup to fix whatever's been corrupted since it was last working properly.