Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Something wrong with my admin folder

Something wrong with my admin folder

Views: 1,019

Results 1 to 4 of 4
8 Oct 2014, 1:00 PM
#1
keithduong avatar

keithduong

New Zenner

Join Date:
Jan 2014
Location:
ottawa, ontario, canada
Posts:
18
Plugin Contributions:
0

Something wrong with my admin folder

Hi,
I have just moved my zen cart from a sub-directory to the root folder by following the link "I have installed Zen Cart to a directory. How do I rename or move that directory?". The zen cart is working. But, when I go to the admin page, it is blank. I can still access the admin panel through the old /root/old_folder/admin and make changes to the root folder zen cart. It seems that the new zen cart cannot see the new admin folder. Trying to correct the problem, I applied the fix_cache_key.php but the blank admin page persists. I looked at my configure.php files and here are some codes related to the admin page/panel. I do not see any wording that I can change to my new admin folder.

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)

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

Would you please let me know what I have done incorrectly?

Thanks

8 Oct 2014, 4:03 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

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

Re: Something wrong with my admin folder

keithduong:

Hi,
I have just moved my zen cart from a sub-directory to the root folder by following the link "I have installed Zen Cart to a directory. How do I rename or move that directory?". The zen cart is working. But, when I go to the admin page, it is blank. I can still access the admin panel through the old /root/old_folder/admin and make changes to the root folder zen cart. It seems that the new zen cart cannot see the new admin folder. Trying to correct the problem, I applied the fix_cache_key.php but the blank admin page persists. I looked at my configure.php files and here are some codes related to the admin page/panel. I do not see any wording that I can change to my new admin folder.

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)

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

Would you please let me know what I have done incorrectly?

Thanks

What about the defines that have FS in them? Do they still point to the old directory or the new one?

8 Oct 2014, 6:54 PM
#3
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Something wrong with my admin folder

keithduong:

... when I go to the admin page, it is blank. ...
Usually a blank (empty) page indicates an error occurred. Can you post the contents of any corresponding debug logs?

8 Oct 2014, 6:55 PM
#4
keithduong avatar

keithduong

New Zenner

Join Date:
Jan 2014
Location:
ottawa, ontario, canada
Posts:
18
Plugin Contributions:
0

Re: Something wrong with my admin folder

mc12345678:

What about the defines that have FS in them? Do they still point to the old directory or the new one?

Thank you very much for your help. I found a missing trailing slash in one of the FS defines. The admin login page is ok now.