Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Cannot access admin area after fresh/clean install

Cannot access admin area after fresh/clean install

Views: 2,907

Results 1 to 9 of 9
28 Sep 2011, 3:10 AM
#1
schoralous avatar

schoralous

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Cannot access admin area after fresh/clean install

Hi

I am setting up a new web server and therefore installed a fresh copy of zen cart on an internet live testing domain we have. The install went fine, all areas of the checks came up green. After the install however I cannot access the admin area. I have renamed the directory, changed the associated values in both configure.php files to reference the new location and reset file permissions as indicated during the install. I can access the normal store pages, but not the admin area.

When I try I see the following in my apache htaccess and suexec logs respectively:

[2011-09-26 08:22:01]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:01 -0700] "GET /catalog/xyzzyx/ HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
[2011-09-26 08:22:02]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:02 -0700] "GET /catalog/xyzzyx/login.php?zenAdminID=950ced8ef8980ea1bea692189dabfbd1 HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
[2011-09-26 08:22:03]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:03 -0700] "GET /catalog/xyzzyx/login.php?zenAdminID=950ced8ef8980ea1bea692189dabfbd1 HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
[2011-09-26 08:22:03]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:03 -0700] "GET /catalog/xyzzyx/login.php?zenAdminID=950ced8ef8980ea1bea692189dabfbd1 HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
[2011-09-26 08:22:04]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:04 -0700] "GET /catalog/xyzzyx/login.php?zenAdminID=950ced8ef8980ea1bea692189dabfbd1 HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"
[2011-09-26 08:22:04]: uid: (1012/registermytreasures.net) gid: (1011/registermytreasures.net) cmd: php5.cgi
63.232.79.212 - - [26/Sep/2011:08:22:04 -0700] "GET /catalog/xyzzyx/login.php?zenAdminID=950ced8ef8980ea1bea692189dabfbd1 HTTP/1.1" 302 - "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; Media Center PC 4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)"

As you can see it's looping, continuously trying to access the admin login.php page, executing it with php.cgi but then recalling it again. The browser never sees anything, and even though I have php told to log everything to syslog via php.ini, nothing shows up in syslog.

Not sure what is going on, php does not appear to be crashing and my other scripts (phpbb3, PHPMysqlAdmin, Roundtable IMAP Client, etc...) as well as the front of the store are working fine so I am stumped

Zen Cart 1.3.9h - 100% Fresh/Clean install
PHP 5.2.17 in CGI mode
Zend Engine 2.2.0
IonCube 4.0.4
Apache 2.2.17 w/SUExec
FreeBSD 8.2-release on amd64
http://www.registermytreasures.net/phpinfo.php (publicly available)

Any ideas anyone? Remote access is available if needed for diag/testing

Thanks in advance

28 Sep 2011, 9:39 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Welcome to the Forum. :smile:

The response code of HTTP/1.1" 302 tells us a redirect is taking place which means your Admin config file probably has incorrect paths in it. Recheck that "all" paths are correct.

30 Sep 2011, 5:59 AM
#4
schoralous avatar

schoralous

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Website Rob:

Welcome to the Forum. :smile:

The response code of HTTP/1.1" 302 tells us a redirect is taking place which means your Admin config file probably has incorrect paths in it. Recheck that "all" paths are correct.

Did that. Even deleted the entire install and re-installed from scratch. Exact same thing happens.

One word of note, the store/scripts are being called via PHP CGI using a wrapper to isolate php so you don't have to have a seperate php.cgi in each virtual servers cgi-bin directory. Wondering if this may have something to do with it since sometimes scripts think they are running out of /cgi-bin instead of their actual location on the server (i.e. /catalog/admin-area-dir)

The wrapper ($VSERVER_DOCUMENT_ROOT/cgi-bin/php5.cgi) is this:

#!/bin/sh
PHPRC=$DOCUMENT_ROOT/../etc/php5
export PHPRC
umask 022
SCRIPT_FILENAME=$PATH_TRANSLATED
export SCRIPT_FILENAME
exec /usr/local/bin/php-cgi

30 Sep 2011, 6:14 AM
#5
schoralous avatar

schoralous

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Website Rob:

Welcome to the Forum. :smile:

The response code of HTTP/1.1" 302 tells us a redirect is taking place which means your Admin config file probably has incorrect paths in it. Recheck that "all" paths are correct.

I also registered as a new user on the store to test that session handling (which is set to db mode) was working right and it appears to be. At least I was able to create a new user from the new user creation page, logout and log back in without any problems.

30 Sep 2011, 12:16 PM
#6
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

As you are using Suhosin you should contact your Hoster about this. The use of a wrapper is probably the cause of the Redirects as Zen Cart itself has some "hardening" built-in and there seems to be a conflict.

You could disable/rename the Admin .htaccess file to see if that helps and you should should remove the 'php.ini' file as that is not information you want available to the public.

30 Sep 2011, 12:26 PM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Just had a look at your site and noticed a "zenid=" is being attached to the URL of every page. That is not normal and could cause various problems. It also tells us there is a problem with paths within both config files and is related to the use of Suhosin and the wrapper.

30 Sep 2011, 3:18 PM
#8
schoralous avatar

schoralous

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Website Rob:

Just had a look at your site and noticed a "zenid=" is being attached to the URL of every page. That is not normal and could cause various problems. It also tells us there is a problem with paths within both config files and is related to the use of Suhosin and the wrapper.

Tried renaming the .htaccess - no joy.

Not sure what to do about the rest. I am the site/hosting administrator. I use Webmin/UserMin/Virtualmin to manage my server and this is how it (Virtualmin) does it when using PHP as a CGI.

I have gone through the config files and checked the paths mentioned in the install files more times than I can count at this point. I know they are right.

What would make zen attach that zenid to the url?

30 Sep 2011, 3:32 PM
#9
schoralous avatar

schoralous

New Zenner

Join Date:
Sep 2011
Posts:
5
Plugin Contributions:
0

Re: Cannot access admin area after fresh/clean install

Schoralous:

Tried renaming the .htaccess - no joy.

Not sure what to do about the rest. I am the site/hosting administrator. I use Webmin/UserMin/Virtualmin to manage my server and this is how it (Virtualmin) does it when using PHP as a CGI.

I have gone through the config files and checked the paths mentioned in the install files more times than I can count at this point. I know they are right.

What would make zen attach that zenid to the url?

Ok, got it working.

Looks like zen does not like PHP via wrapped CGI, however it appears to be fine with PHP via FastCGI called wrappers - go figure

Not sure why the difference but when I turned on FastCGI it fired right up. I suspect it has to do with the difference in how the two handle redirections.

Thanks for the help :)