Forums / General Questions / Cant login to admin panel on sub-domain duplicate installation

Cant login to admin panel on sub-domain duplicate installation

Views: 1,350

Results 1 to 3 of 3
26 Jul 2012, 1:06 AM
#1
davidweaver88 avatar

davidweaver88

New Zenner

Join Date:
May 2012
Posts:
7
Plugin Contributions:
0

Cant login to admin panel on sub-domain duplicate installation

Ok so I am building a Zen Cart 1.5.0 site on the following domain isawusa.com I also have a subdomain dealers.isawusa.com the sub-domain will be for wholesale only. After creating the main site I copied all the contents of the root directory (html folder) on my web server into the /dealers folder (html/dealers) on the same server (this is where the sub-domain points to).

I then copied the database from the main site into a new database (different names but otherwise identical at this point). Finally I updated the /dealers/admin_panel/includes/configure.php file and the /dealers/includes/configure.php to reflect the different url for http and https (dealers.isawusa.com vs isawusa.com) and of course I changed the database connection information so that it connects to the new duplicate database.

At this point if I go the dealers.isawusa.com everything appears to be working just fine, however I am unable to login to the admin panel for the dealers.isawusa.com sub-domain (https://dealers.isawusa.com/admin_panel/login.php?). When I input my username and password and click login, it simply refreshes the page without actually logging me in... it just brings me right back to the login page without displaying any messages or errors.

I have tried deleting my browser cookies and cache and renaming the .htaccess file under /dealers/admin_panel/includes to .htaccessBAK but none of this has worked.

Any help would be greatly appreciated, thanks in advance.

26 Jul 2012, 2:11 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: Cant login to admin panel on sub-domain duplicate installation

What browser are you using? Have you tried a different browser?
Chrome and Firefox and IE and Safari all handle cookie designations differently, and they might be getting confused because of the shared domain name.
The "screen refresh without error message" is symptomatic of it being unable to set a valid session cookie and thus unable to start a session.

And/or you need to run the fix_cache_key utility because your subdomain site is configured inside the database to still point to the non-subdomain site for its session handling. See this FAQ article, which explains the same thing as what you've just tried to do, albeit you're using the same server in this case. The same steps all apply equally. http://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

27 Jul 2012, 10:11 PM
#3
davidweaver88 avatar

davidweaver88

New Zenner

Join Date:
May 2012
Posts:
7
Plugin Contributions:
0

Re: Cant login to admin panel on sub-domain duplicate installation

I followed those instructions... I started by deleting the database I created and then I deleted the installation on the subdomain. Then I used the auto installation feature on godaddy to create a new zen cart installation on the subdomain. After that was complete I saved the new configure.php and admin configure.php files and then deleted everything in the subdomain folder. Then I opened up the new database and dropped all the tables, I then exported the database on the main site to sql with the complete inserts and extended inserts option selected. I then ran the sql in the new database so the two databases are identical. Then I copied the main site to the subdomain folder and replaced the configure.php and admin configure.php files with the ones I saved earlier... tada! it works now