Zen Cart Logo
Forums / General Questions / Admin redirects to re-install instructions

Admin redirects to re-install instructions

Views: 865

Results 1 to 14 of 14
1 Mar 2017, 8:06 PM
#1
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Admin redirects to re-install instructions

PhP version 5.6.29
I am not sure what has happened but I can't login to the site admin area. I have been working with my host for days now and they having trying to figure it out as well. This what I see when I go to the URL login.

Hello. Thank you for loading Zen Cart®.

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.

To begin installation ...

The Installation Documentation can be read by clicking here: Documentation
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).
The Online FAQ and Tutorials area on the Zen Cart® website will also be of value if you run into difficulties.I was told by tech support that the configure.php file settings looks correct. I am at the end of my rope. Thank you for any help!

1 Mar 2017, 10:30 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Admin redirects to re-install instructions

If your front end is working but your admin is not, typically this is a difference in settings/values. This could be database related or file folder differences.

Suggestion would be to reply to this thread.
Click the # in the menubar of the message editor.
Paste the includes/configure.php file
Obscure all DB_ related entries, except DB_PREFIX.

Then repeat for admin/includes/configure.php

Note, a properly installed/upgraded ZC version 1.5.1 and above should not have a hard coded admin folder name in the admin/includes/configure.php. If yours does, then please obscure the admin folder name as well and can go from there.

Also, although the request is to not post the DB_ related information, take yet another look at the two files to verify that they both have the same information.

Perhaps something will pop out as a result of this and you can get on with administering your store!

1 Mar 2017, 11:31 PM
#3
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

Here is one the site doesn't look right on the front end anymore. I don't know what my host is doing now.

<?php /** * @package Configuration Settings circa 1.5.0 * @copyright Copyright 2003-2011 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * File Built by zc_install on 2012-04-06 08:51:03 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ /** * 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', 'http://mamabessiesplace.net'); define('HTTPS_SERVER', 'https://mamabessiesplace.net'); define('HTTP_CATALOG_SERVER', 'http://mamabessiesplace.net'); define('HTTPS_CATALOG_SERVER', 'https://mamabessiesplace.net'); // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_ADMIN', 'false'); // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes). define('ENABLE_SSL_CATALOG', 'false'); // 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) $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path']; define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/'); define('DIR_WS_HTTPS_CATALOG', '/'); 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_BOXES', DIR_WS_INCLUDES . 'boxes/'); 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', realpath(dirname(__FILE__) . '/../') . '/'); //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ define('DIR_FS_CATALOG', '/home/alfonsom/public_html/'); 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'); define('DB_SERVER_USERNAME', 'dddddd'); define('DB_SERVER_PASSWORD', 'ddddd'); define('DB_DATABASE', 'ddddd'); // 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/dddd/public_html/cache'); // Define the webserver and path parameters // Main webserver: eg-http://www.your_domain.com - // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.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 */ // EOF
1 Mar 2017, 11:36 PM
#4
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

Here is the other one. One thing I have noticed that area define('DB_SERVER_USERNAME', 'ddddd');
define('DB_SERVER_PASSWORD', 'ddddd');
define('DB_DATABASE', 'ddddd');
Is different on both files, I added the ddds for protection of course. I am willing to pay someone at this point.

<?php
/**
 * @package Configuration Settings circa 1.5.0
 * @copyright Copyright 2003-2011 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * File Built by zc_install on 2012-04-06 08:51:03
 */


/*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

/**
 * 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', 'http://mamabessiesplace.net');
  define('HTTPS_SERVER', 'https://mamabessiesplace.net');
  define('HTTP_CATALOG_SERVER', 'http://mamabessiesplace.net');
  define('HTTPS_CATALOG_SERVER', 'https://mamabessiesplace.net');

  // 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');

// 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)
  $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];

  define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
  define('DIR_WS_HTTPS_CATALOG', '/');

  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_BOXES', DIR_WS_INCLUDES . 'boxes/');
  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', realpath(dirname(__FILE__) . '/../') . '/');
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/dddd/public_html/mamabessiesplace.net/');

  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');
  define('DB_SERVER_USERNAME', 'ddddd');
  define('DB_SERVER_PASSWORD', 'ddddd');
  define('DB_DATABASE', 'ddddd');

  // 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/dddd/public_html/mamabessiesplace.net/cache');


// Define the webserver and path parameters
  // Main webserver: eg-http://www.your_domain.com - 
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.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
   */
// EOF
1 Mar 2017, 11:51 PM
#5
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Admin redirects to re-install instructions

Well, your admin file has not been updated to the ZC 1.5.5 version, but seeing that your store side is showing the proper data, and your admin is having a connection problem, your admin's DB_ data should be modified to what your store's DB_ values are. Before trying to modify your admin/includes/configure.php file, be sure that the file's permissions are 644. If that is not familiar to you, then be sure that after you try to save the changes, verify by opening/refreshing the file that the changes survived.

1 Mar 2017, 11:54 PM
#6
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Admin redirects to re-install instructions

Just noticed another thing. Both posted files are the same. Not sure if that was an accidental posting issue or if they are actually the same. (I'm leaning towards the accidental posting issue more than anything, but could be wrong.)

2 Mar 2017, 12:08 AM
#7
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

No I copied each file. The store is no longer showing properly I don't know what my host did at this point.
I have no idea how to do any of this. "Well, your admin file has not been updated to the ZC 1.5.5 version, but seeing that your store side is showing the proper data, and your admin is having a connection problem, your admin's DB_ data should be modified to what your store's DB_ values are. Before trying to modify your admin/includes/configure.php file, be sure that the file's permissions are 644. If that is not familiar to you, then be sure that after you try to save the changes, verify by opening/refreshing the file that the changes survived."

2 Mar 2017, 12:12 AM
#8
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

They also look like they are pointing to 2 different databases, but I maybe wrong as I am no expert. I need have someone fix this for me.

2 Mar 2017, 3:25 AM
#9
drbyte avatar

drbyte

Sensei

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

Re: Admin redirects to re-install instructions

Assuming you're correct in stating that you pasted contents of different config files, it looks like "someone" copied one of the config files to replace the other one.

Also, it "seems" that you're implying that everything "was" working fine until "some" recent date. It would be interesting to match up "that" date with recent invisible updates the hosting company has applied to the server software, such as a PHP version update, where they accidentally (or didn't even realize they) changed the php.ini master configuration settings, which are now negatively influencing your Zen Cart site.

I'm mindful that: if nobody changed your site's files, and therefore didn't change your Zen Cart code, then something else on the server has changed. Usually that's PHP versions or PHP configuration or filesystem directory name changes/moves.

Just a few things to consider.

2 Mar 2017, 11:03 PM
#10
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Admin redirects to re-install instructions

your config file is wrong as of this moment. when i go to the home page, the site loads, however its looking for images, css, js files, etc. in the wrong place. for example, ZC is looking for your logo here:

http://mamabessiesplace.net/home/nafric5/public_html/mamabessiesplace.net/includes/templates/avonlee_contempo/images/logo.png

when the correct location is here:

http://mamabessiesplace.net/includes/templates/avonlee_contempo/images/logo.png

this is all set in the config.

in addition, you are using a URL rewriter. i would turn that off until you get the rest of the problems sorted out first.

good luck,

2 Mar 2017, 11:06 PM
#11
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

Thank you, this was all done by my host. I am sure what you mean by a URL rewriter

2 Mar 2017, 11:23 PM
#12
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,953
Plugin Contributions:
8

Re: Admin redirects to re-install instructions

it sounds like you need a host with better ZC experience. someone recently recommended geekhost as being very ZC competent. (i have NO affiliation/experience with them, and i am personally not recommending them, i'm just recounting someone else's post.)

you can read about URL rewriting here:

https://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/

there should be a config setting to turn it off, makes it hard if you can not get to the admin.

you said your site was v155. your config files look much older to me. they define a variable:

DIR_WS_CATALOG_IMAGES

that definition in my v155 install is NO longer in the includes files.

good luck.

3 Mar 2017, 12:19 AM
#13
jen_will avatar

jen_will

New Zenner

Join Date:
Jul 2006
Posts:
60
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

This has been solved by mc12345678! Thank you so much!

3 Mar 2017, 12:23 AM
#14
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,841
Plugin Contributions:
0

Re: Admin redirects to re-install instructions

mc numbers to the rescue!:D