Zen Cart Logo
Forums / Installing on a Linux/Unix Server / help! installing ZC in http://subdomain.website.com/folder

help! installing ZC in http://subdomain.website.com/folder

Locked

Views: 2,338

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
9 Oct 2007, 12:32 PM
#1
molywerks avatar

molywerks

Zen Follower

Join Date:
Aug 2006
Posts:
136
Plugin Contributions:
0

help! installing ZC in http://subdomain.website.com/folder

Hello, I am having troubles installing Zen Cart in a folder of a subdomain.

I get Zen Cart installed and can get the store page to appear but when I try to go to subdomain.website.com/folder/admin and login, the login returns me to the admin/login page as if it took but didn't redirect.

Not sure why admin login fails to redirect me back to admin/index.php, but could it be due to how my host handles subdomains?

I've got my configure.php files triple-checked and they are set up properly. But I'm unsure -- given how many threads say to install Zen Cart in the root -- that Zen Cart can handle the path structure (see below) that is in includes/configure.php.

define('DIR_FS_CATALOG', '/home/myaccount/public_html/myworkdomains/subdomains/myclient/old-data/')

The above path translates to http://myclient.myworksite.com/old-data/, which is what I want in the browser address bar for now.

I'm pretty familiar with WordPress and I can install WP in subfolders of subfolders in subdomains of subdomains without trouble, so I am unsure why Zen Cart cannot handle it. FWIW, I had to put DirectoryIndex index.php into .htaccess in both old-data and old-data/admin for the store to appear and admin login page to appear without requiring the clicking of a file. Not sure if that is standard or not. Is .htaccess perhaps the solution to my trouble(s)?

Any suggestions?

Thanks in advance.

9 Oct 2007, 1:40 PM
#2
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: help! installing ZC in http://subdomain.website.com/folder

If you are having a problem accessing the admin section then you should be looking at the /admin/includes/configure.php settings, not the shop configure.php.

9 Oct 2007, 3:04 PM
#3
molywerks avatar

molywerks

Zen Follower

Join Date:
Aug 2006
Posts:
136
Plugin Contributions:
0

Re: help! installing ZC in http://subdomain.website.com/folder

Right, and there is no difference in admin/includes/configure.php (see attachment) except the obvious, that the /admin/ folder is added in the appropriate line(s), e.g. define('DIR_FS_ADMIN', '/home/myaccount/public_html/myworkdomains/subdomains/myclient/old-data/admin/');.

9 Oct 2007, 3:19 PM
#4
chuckl avatar

chuckl

Totally Zenned

Join Date:
Nov 2006
Location:
Papworth, Cambridgeshire, UK
Posts:
717
Plugin Contributions:
0

Re: help! installing ZC in http://subdomain.website.com/folder

To me, your site is actually http://myclient.myworksite.com/old-data/. i.e. that is the path you would enter in order to get to the shop/catalog, not to some arbitrary point 'hovering' a level or two above it.
Making the subsequent paths /admin/ for admin, / for catalog, and so on.

I may be wrong, but it seems to me that if you don't define it that way, you then have an potential inconsistency between the website and file system paths

9 Oct 2007, 3:41 PM
#5
molywerks avatar

molywerks

Zen Follower

Join Date:
Aug 2006
Posts:
136
Plugin Contributions:
0

Re: help! installing ZC in http://subdomain.website.com/folder

Yes, the differences betwixt the URL and the PATH while appearing wonky are correct due to how Site5 handles subdomains and subdomain folders, which may be anywhere and named anything, thus, the oddness of my URL and PATH. Such a protocol helps to keep things straight on the backend and when trying to troubleshoot. At least in my opinion.

Thus, my admin site URL is http://myclient.myworksite.com/old-data/admin/ but the host server path is /home/myaccount/public_html/myworkdomains/subdomains/myclient/old-data/admin/.

So, do you mean I should try define('DIR_FS_ADMIN', 'http://myclient.myworksite.com/old-data/admin/');, making appropriate changes elsewhere as well?

9 Oct 2007, 3:50 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: help! installing ZC in http://subdomain.website.com/folder

cartguin:

I get Zen Cart installed and can get the store page to appear but when I try to go to subdomain.website.com/folder/admin and login, the login returns me to the admin/login page as if it took but didn't redirect.

**Not sure why admin login fails to redirect me back to admin/index.php, but could it be due to how my host handles subdomains?**Your configure.php file is probably fine.

But you're probably encountering a problem with PHP sessions whereby your admin access isn't being allowed because of some sort of block when attempting to activate the session.
Common causes would include firewall software blocking session cookies, confused browser cache, bad cookies in browser cache, mismatched domain name vs session cookie value, weak PHP configuration for session handling, etc.

9 Oct 2007, 4:13 PM
#7
molywerks avatar

molywerks

Zen Follower

Join Date:
Aug 2006
Posts:
136
Plugin Contributions:
0

Re: help! installing ZC in http://subdomain.website.com/folder

Oh -- arghy, farghy, blimey -- duh.

Thanks, Dr. Byte!

That's the beauty of never using IE7, you can quickly verify if something is a Firefox cache/cookie thing. Since I probably hadn't closed Firefox in a week and who knows when my computer was last restarted, I did both, and voila! That did the trick. Why can I never remember this simple little issue of refreshing the cache and cookies, etc.?!

And thanks Chuckl for the quick replies.