If this is your first visit, check our documentation. To post, register or login.
Forums / Upgrading Your Zen Cart / Upgrading to 1.5.x / 1.3.9h to 1.54 --> no admin

1.3.9h to 1.54 --> no admin

Started by split63 on 24 Jun 2015, 5:43 PM · Views: 1,663

Results 1 to 17 of 17
24 Jun 2015, 5:43 PM
#1
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #1 by split63

I just ran the upgrade process. It claimed success
I changed the admin folder name.
The cart seems to work.
When I attempt to access the admin page I get a page that starts with
"You are seeing this page for one or more reasons:"
Then it lists config.php and database reasons.

I have made the config.php read only
I deleted the install directory
The admin/config.php admin paths apparently don't matter in 1.54

Is there a log file or something to help narrow in on the source of this issue?

24 Jun 2015, 6:34 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #2 by stevesh

split63:

I just ran the upgrade process. It claimed success
I changed the admin folder name.
The cart seems to work.
When I attempt to access the admin page I get a page that starts with
"You are seeing this page for one or more reasons:"
Then it lists config.php and database reasons.

I have made the config.php read only
I deleted the install directory
The admin/config.php admin paths apparently don't matter in 1.54

Is there a log file or something to help narrow in on the source of this issue?

What does that mean? Generally, seeing that page means that the path info in the configure.php file is wrong.

24 Jun 2015, 8:45 PM
#3
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #3 by split63

stevesh:

What does that mean? Generally, seeing that page means that the path info in the configure.php file is wrong.
1.5.4 claims that the admin paths in admin/includes/config.php are no longer used. I corrected them with the new admin folder name anyway, and still I get the previously mentioned page.

24 Jun 2015, 9:58 PM
#4
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #4 by mc12345678

How about providing the message in it's entirety? (Still obscure the actual admin folder name if and where presented.)

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

24 Jun 2015, 10:10 PM
#5
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #5 by split63

mc12345678:

How about providing the message in it's entirety? (Still obscure the actual admin folder name if and where presented.)

You are seeing this page for one or more reasons:

This is your first time using Zen Cart® and you haven't yet completed the normal Installation procedure.
If this is the case for you, you will need to upload the "zc_install" folder using your FTP program, and then run zc_install/index.php via your browser (or reload this page to see a link to it).

Your /includes/configure.php and/or /admin/includes/configure.php file contains invalid path information and/or invalid database-connection information.
If you recently edited your configure.php files for any reason, or maybe moved your site to a different folder or different server, then you'll need to review and update all your settings to the correct values for your server.
Additionally, if the permissions have been changed on your configure.php files, then maybe they're too low for the files to be read.
Or the configure.php files could be missing altogether.
Or your hosting company has recently changed the server's PHP configuration (or upgraded its version) then they may have broken things as well.
See the Online FAQ and Tutorials area on the Zen Cart® website for assistance.
24 Jun 2015, 10:58 PM
#7
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #7 by split63

The Zen Log files have no errors
The Server log files show no errors.
I have checked and double checked the server config in the config files. Its the same setup that just resulted in a successful install.

25 Jun 2015, 12:29 PM
#8
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #8 by stevesh

No, all that link means is that you no longer have to manually edit the admin/includes/configure.php file when you change your admin folder name. The general path still has to be correct. You could post the contents of that file here, after X'ing out the database info.

25 Jun 2015, 1:02 PM
#9
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #9 by split63

stevesh:

No, all that link means is that you no longer have to manually edit the admin/includes/configure.php file when you change your admin folder name. The general path still has to be correct.
It says, change the folder name and don't worry about what's in the file ```
There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder.


 I was just looking at the dist-config.php file and its very different.   I suspect the issue is that the directions above do not apply for an upgrade.   I will try just adding the server info to the dist-config.php file and see if that works.
25 Jun 2015, 1:16 PM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #10 by mc12345678

Keep talking about dist-config.php. Do you have includes/configure.php and YOUR_ADMIN/includes/configure.php? Those are the files that ZC looks for/at, not dist-configure.php.

They do still apply to an upgrade at least if the upgrade involves configure.php files that were generated by ZC 1.5.x for the most part, though with the significant changes from 1.3.9h to 1.5.4, the "upgrde" should have been performed via instruction like: http://www.zen-cart.com/entry.php?3-How-do-I-rebuild-my-site-on-the-new-version-instead-of-upgrading

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

25 Jun 2015, 1:23 PM
#11
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #11 by split63

Just changing the server info in the dist-config.php did not work. (Yes, I changed the name to config.php)

Here is an entry from the dist-config.php file

  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');

Should this line be modified to include the secret admin directory name? For example:

  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/MyZen/');

Also, I assume I should be focused on the /MyZen/MyAdmin/config.php and not the /MyZen/config.php file

This entry seems anemic:

define('DIR_WS_CATALOG', '/');

Should it be

define('DIR_WS_CATALOG', '/MyZen/');
25 Jun 2015, 2:08 PM
#12
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #12 by stevesh

split63:

It says, change the folder name and don't worry about what's in the file ```
There is no need to alter the admin configure.php in v1.5.x when renaming your admin folder.


Correct. Just change your admin folder name, leave the configure.php file alone, and Zencart will find the admin folder.
25 Jun 2015, 2:09 PM
#13
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #13 by split63

Nothing I do seems to matter. If only there was an error message or something!!!!
Here is the whole admin config.php file.

<?php

/**

 * dist-configure.php

 * SAMPLE (but NOT FUNCTIONAL) file

 *

 * @package Configuration Settings

 * @package Admin

 * @copyright Copyright 2003-2014 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 GIT: $Id: Author: DrByte  Modified in v1.5.4 $

 * @private

 */

/**

 * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:

 * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:

 */

  define('HTTP_SERVER', 'https://localhost');

  define('HTTPS_SERVER', 'https://localhost');

  define('HTTP_CATALOG_SERVER', 'http://localhost');

  define('HTTPS_CATALOG_SERVER', 'https://localhost');



  // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).

  define('ENABLE_SSL_ADMIN', 'true');



  // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).

  define('ENABLE_SSL_CATALOG', 'true');





//  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/MyAdmin/');

//  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_CATALOG', '/MyZen/');
  
//  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/MyAdmin/');  
  
 // define('DIR_WS_HTTPS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/MyZen/');


// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!

// * DIR_WS_* = Webserver directories (virtual/URL)

  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

  define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');

  define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');

  define('DIR_WS_INCLUDES', 'includes/');

  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');

  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');

  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');

  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

  define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');



// * DIR_FS_* = Filesystem directories (local/physical)

//  define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
//  define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/MyAdmin/'));
  define('DIR_FS_ADMIN', '/home/content/n/e/x/MyID/html/MyZen/MyAdmin/');  //UG: 6_15_11


//  define('DIR_FS_CATALOG', '/');
  define('DIR_FS_CATALOG', '/home/content/n/e/x/MyID/html/MyZen/');


  //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash

//  define('DIR_FS_LOGS', DIR_FS_CATALOG . '/logs');
  define('DIR_FS_LOGS', DIR_FS_CATALOG . '/home/content/n/e/x/MyID/html/MyZen/logs');


  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

  define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');

  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');



// define our database connection

  define('DB_TYPE', 'mysql');

  define('DB_PREFIX', 'zen_');

  define('DB_CHARSET', 'utf8');

  //define('DB_SERVER', 'localhost');

SERVER INFO REMOVED



  // The next 2 "defines" are for SQL cache support.

  // For SQL_CACHE_METHOD, you can select from:  none, database, or file

  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache

  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder

  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash

  define('SQL_CACHE_METHOD', 'none');

  define('DIR_FS_SQL_CACHE', '/home/content/n/e/x/MyID/html/MyZen/cache');





//Explanations of the webserver and path parameters:

// HTTP_SERVER is your Main webserver: eg-http://www.yourdomain.com

// HTTPS_SERVER is your Secure webserver: eg-https://www.yourdomain.com

// HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.yourdomain.com

// HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.yourdomain.com

/*

 * URLs for your site will be built via:

 *     HTTP_SERVER plus DIR_WS_ADMIN or

 *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or

 *     HTTP_SERVER plus DIR_WS_CATALOG or

 *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG

 * ...depending on your system configuration settings

 */
25 Jun 2015, 2:28 PM
#14
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #14 by mc12345678

Several "errors" in the file.

First, the filename is configure.php not config.php. Second how do you get to this site you are hosting, is it http://localhost or is it some other address?
3) Do you have a SSL certificate?
4) Your logs definition is wrong, either remove DIR_FS_CATALOG . Or remove everything within the single quote that follows leaving only /logs.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

25 Jun 2015, 2:38 PM
#15
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #15 by split63

mc12345678:

Several "errors" in the file.

First, the filename is configure.php not config.php.
Yes, it is configure.php
mc12345678:

Second how do you get to this site you are hosting, is it http://localhost or is it some other address?
I have tried using the real URL:

define('HTTPS_SERVER', 'https://www.MyDomain.com');

mc12345678:

  1. Do you have a SSL certificate?
    Yes
    mc12345678:

  2. Your logs definition is wrong, either remove DIR_FS_CATALOG . Or remove everything within the single quote that follows leaving only /logs.
    As you can see in the file, it was originally:
    define('DIR_FS_LOGS', DIR_FS_CATALOG . '/logs');
    However, look at the note in the file just above that entry. It says to change it.

25 Jun 2015, 3:47 PM
#16
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #16 by mc12345678

It does not say to change it, it identifies that it is equivalent. By substitution (as DIR_FS_CATALOG is defined above to include everything up to the catalog itself) the full path to the logs directory is defined with DIR_FS_CATALOG . '/logs'

Includes/configure.php and admin/includes/configure.php are the files used by a standard version of ZC that can be downloaded from https://www.zen-cart.com/getit.

Problems could exist if there is a configure.php file in includes/local or admin/includes/local. Verify the absence of configure.php from each of those directories. Also, be sure that the database information in the admin/includes/configure.php matches the database information in includes/configure.php

Admin/includes/config.php is a file added by some other process/action unrelated to a default install.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

25 Jun 2015, 4:09 PM
#17
split63 avatar

split63

Totally Zenned

Join Date:
May 2010
Location:
Texas
Posts:
513
Plugin Contributions:
0

Post #17 by split63

I can't believe it. The problem was that I copied the configure.php in to ./admin/ instead of /admin/includes. Sorry folks.
I'm now at least getting an error message.