Zen Cart Logo
Forums / Basic Configuration / Can't access admin panel at all

Can't access admin panel at all

Views: 3,191

Results 1 to 20 of 22
17 Mar 2014, 10:03 PM
#1
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Can't access admin panel at all

I have switched my shop to it's own area on my server and I followed the instructions to the "T" in this thread:

http://www.zen-cart.com/content.php?160

I have switched directories for the shop when I originally built it and then we moved it to a different url (shop.mysite.com) and when I first moved it, it was working. It's been quite a few months since I even visited the shop site because it's not open or ready for business yet. But I never registered as a "member" of my own shop, I only had and needed admin access.

I also renamed the admin folder for security purposes.

I opened both configure.php files and the info is absolutely correct according to the instructions.

When I navigate to my admin area URL I get an error page telling me I need to set the site up all over again.
I can see the shop itself just fine. It's my admin panel that throws this error.

Any help would be appreciated.

18 Mar 2014, 1:21 AM
#2
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Can't access admin panel at all

Did you hide/remove your zc_install folder via ftp?

18 Mar 2014, 2:21 AM
#3
stevesh avatar

stevesh

Black Belt

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

Re: Can't access admin panel at all

If you're seeing the page I think you are, it means the path information in YOUR_ADMIN/includes/configure.php is wrong. Try posting the contents of that file here after XXXing out the database name, user name and password.

18 Mar 2014, 12:06 PM
#4
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

stevesh:

If you're seeing the page I think you are, it means the path information in YOUR_ADMIN/includes/configure.php is wrong. Try posting the contents of that file here after XXXing out the database name, user name and password.

I think the problem is this line (line 52):

  define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');

I played with it a couple of ways and it still returns the same error or a blank white page.

Here is the rest of the file in it's entirety:

<?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-06-26 01:25:02
 */


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

  // 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', '/var/www/clients/client2/web3/web/');

  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', '');
  define('DB_CHARSET', 'utf8');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'xx_xxxxxx');
  define('DB_SERVER_PASSWORD', 'xxxxxxxxx');
  define('DB_DATABASE', 'xx_xxxxxx');

  // 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', '/var/www/clients/client2/web10/web/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
18 Mar 2014, 12:47 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,099
Plugin Contributions:
56

Re: Can't access admin panel at all

Do you, by any chance, have a file named /YOUR_ADMIN/includes/local/configure.php?

18 Mar 2014, 1:55 PM
#6
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

lat9:

Do you, by any chance, have a file named /YOUR_ADMIN/includes/local/configure.php?

Please see post #4. I pasted the entire configure.php file as per stevesh's request.

There is no /includes/local directory

18 Mar 2014, 1:58 PM
#7
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

Twitchin Kitten:

Please see post #4. I pasted the entire configure.php file as per stevesh's request.

There is no /includes/local directory

Wait, I stand corrected. There is a 'local' directory in there but there is only a 'skip_version_check.ini' file in there

18 Mar 2014, 5:56 PM
#8
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,099
Plugin Contributions:
56

Re: Can't access admin panel at all

Check the following definition in /YOUR_ADMIN/includes/configure.php:

//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/'); 

Does it contain exactly the same setting as the like-named definition in /includes/configure.php?

18 Mar 2014, 9:08 PM
#9
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

lat9:

Check the following definition in /YOUR_ADMIN/includes/configure.php:

//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/');

> Does it contain **exactly the same setting** as the like-named definition in /includes/configure.php?

Yes they are the same. I still think it's this line that is the issue and I am unsure how to fill it out:

```php
   define('DIR_FS_ADMIN', realpath(dirname(__FILE__) . '/../') . '/');  
19 Mar 2014, 12:07 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Can't access admin panel at all

There is/was a fix identified for that line, which I apologize I don't have available at the moment. To also be clear, regarding the local directory issue, you had not only looked in includes/local, but also admin/includes/local correct?

I think that line was corrected in 1.5.1, but I've seen a post about it on the site somewhere, having to do with an extra .. Or something. Did you say your new store location is in a sub-directory or at the root?

19 Mar 2014, 12:07 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Can't access admin panel at all

Could try to hard code it, just to see...

19 Mar 2014, 12:41 AM
#12
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

mc12345678:

There is/was a fix identified for that line, which I apologize I don't have available at the moment. To also be clear, regarding the local directory issue, you had not only looked in includes/local, but also admin/includes/local correct?

I think that line was corrected in 1.5.1, but I've seen a post about it on the site somewhere, having to do with an extra .. Or something. Did you say your new store location is in a sub-directory or at the root?

Just to double check i checked /includes/local <-- there is no local file
I checked again /admin/includes/local and there is only that one file I mentioned earlier - the skip version check file.

It's weird - the site worked when I built it in a "hidden" directory.
It worked when I moved it to the root.
It does not work now that I moved it to store.mysite.com
And just to be clear, the storefront works - it is ONLY the admin panel I cannot locate.

mc12345678:

Could try to hard code it, just to see...

I don't code. I'm not even going to attempt it.

If I knew what that one line should be filled in as, I got a feeling that might work.

I also read a later version had a fix for this but I just don't know what version I have anymore. I parked the store months ago and forgot about it. Now I have someone who wants one so I wanted to show him mine as an example so he can poke around since I dont' have inventory yet. This is when I discovered the issue with the ACP.

I don't want to build it all over again. I spent weeks customizing the look and feel. Ugh.

19 Mar 2014, 12:42 AM
#13
trinity14 avatar

trinity14

Zen Follower

Join Date:
Jan 2014
Location:
Ontario, Canada
Posts:
252
Plugin Contributions:
3

Re: Can't access admin panel at all

Below is your configure.php> Yes they are the same. I still think it's this line that is the issue and I am unsure how to fill it out:

PHP Code:
define('DIR_FS_ADMIN', realpath(dirnameCOLOR=#007700 . '/../') . '/'); [/COLOR]
This is my configure.php
define('DIR_FS_ADMIN', realpath(dirname(FILE) . '/../') . '/');

Not the issue :/

Double check-> define('DB_SERVER', 'xxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxx');
define('DB_DATABASE', 'xxx');

Hope that helps too

19 Mar 2014, 12:55 AM
#14
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

Trinity14:

Below is your configure.php
This is my configure.php
define('DIR_FS_ADMIN', realpath(dirname(FILE) . '/../') . '/');

Not the issue :/

Double check-> define('DB_SERVER', 'xxxxxxx');
define('DB_SERVER_USERNAME', 'xxxxx');
define('DB_SERVER_PASSWORD', 'xxxxxx');
define('DB_DATABASE', 'xxx');

Hope that helps too

They're exactly the same in both config files.

19 Mar 2014, 1:15 AM
#15
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Can't access admin panel at all

Twitchin Kitten:

Just to double check i checked /includes/local <-- there is no local file
I checked again /admin/includes/local and there is only that one file I mentioned earlier - the skip version check file.

It's weird - the site worked when I built it in a "hidden" directory.
It worked when I moved it to the root.
It does not work now that I moved it to store.mysite.com
And just to be clear, the storefront works - it is ONLY the admin panel I cannot locate.

I don't code. I'm not even going to attempt it.

If I knew what that one line should be filled in as, I got a feeling that might work.

I also read a later version had a fix for this but I just don't know what version I have anymore. I parked the store months ago and forgot about it. Now I have someone who wants one so I wanted to show him mine as an example so he can poke around since I dont' have inventory yet. This is when I discovered the issue with the ACP.

I don't want to build it all over again. I spent weeks customizing the look and feel. Ugh.

What about your .htaccess file? When it was in a "hidden" directory and then now moved, if you look at the .htaccess of the root of your store, do you see a reference to your old admin panel path? May need to update it to reflect your current admin panel.

19 Mar 2014, 1:22 AM
#16
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

mc12345678:

What about your .htaccess file? When it was in a "hidden" directory and then now moved, if you look at the .htaccess of the root of your store, do you see a reference to your old admin panel path? May need to update it to reflect your current admin panel.

the only thing in that file is this:

Default .htaccess file

19 Mar 2014, 1:39 AM
#17
trinity14 avatar

trinity14

Zen Follower

Join Date:
Jan 2014
Location:
Ontario, Canada
Posts:
252
Plugin Contributions:
3

Re: Can't access admin panel at all

Twitchin Kitten,
The error says: includes/configure.php file contents invalid. ie: DIR_FS_CATALOG not valid or not set

in your configure.php

define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/');

is it possible that your path needs to say web10 like the one below?

define('DIR_FS_SQL_CACHE', '/var/www/clients/client2/web10/web/cache/');

19 Mar 2014, 2:09 AM
#18
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Can't access admin panel at all

Twitchin Kitten:

<?php define('HTTP_SERVER', 'http://shop.MYSITE.com'); define('HTTPS_SERVER', 'https://shop.MYSITE.com'); define('HTTP_CATALOG_SERVER', 'http://shop.MYSITE.com'); define('HTTPS_CATALOG_SERVER', 'https://shop.MYSITE.com'); define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/'); // 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', '/var/www/clients/client2/web10/web/cache/'); ``` Looking at the above, how does shop.MYSITE.com get to the path /var/www/clients/client2/web10/web or any other sub path to get there? (Ie. is there something that is setup with your host to redirect shop.MYSITE.com that isn't carried over when you append your admin directory?) Also, was going to comment that the final path supposedly doesn't/shouldn't affect the usage of the cart as the SQL_CACHE_METHOD is set to none... I could be wrong though about that, just thinking the little snippet of instruction above it would indicate that...
20 Mar 2014, 12:23 PM
#19
twitchin_kitten avatar

twitchin_kitten

New Zenner

Join Date:
Jun 2012
Location:
USA
Posts:
18
Plugin Contributions:
0

Re: Can't access admin panel at all

Trinity14:

Twitchin Kitten,
The error says: includes/configure.php file contents invalid. ie: DIR_FS_CATALOG not valid or not set

in your configure.php

define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/');

is it possible that your path needs to say web10 like the one below?

define('DIR_FS_SQL_CACHE', '/var/www/clients/client2/web10/web/cache/');

Thank you! That was it.

Looking at lines of this stuff makes me dizzy sometimes and when BOTH files were exactly the same, AND the cart itself was working, it got me confused, which isn't very hard to do!
I had to edit this line in BOTH config files. Now the login page shows.

Thank you everyone. The help was very much appreciated.

20 Mar 2014, 12:35 PM
#20
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,099
Plugin Contributions:
56

Re: Can't access admin panel at all

lat9:

Check the following definition in /YOUR_ADMIN/includes/configure.php:

//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/var/www/clients/client2/web3/web/');

> Does it contain **exactly the same setting** as the like-named definition in /includes/configure.php?

> **Twitchin Kitten:**
>
> Thank you! That was it.
> 
> Looking at lines of this stuff makes me dizzy sometimes and when BOTH files were exactly the same, AND the cart itself was working, it got me confused, which isn't very hard to do!
> I had to edit this line in BOTH config files. Now the login page shows.
> 
> Thank you everyone. The help was very much appreciated.
Sometimes, it's hard to see the tree for the forest!