Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

SOLVED: Cannot login after server and domain change
 
mr_tom
Jr. Member
 
Total Posts:  3
Joined:  2012-10-31
 

Hi all,

I have moved a Magento install from one server to another. The install is currently still in “testing” and as such was running on a <site_name>.testing.<server_name>.<old_hosting_domain> - and is now under <site_name>.testing.<different_server_name>.<new_hosting_domain>

I have followed a few guides about changing Varien.php, and I have updated the database fields in core_config_data.

The DNS for the new domain works fine, and the main site works fine, however when I try and login to the admin area, it just takes me back to the login screen - although the address bar updates with a URL which looks like I should be at the dashboard.

If I enter invalid credentials, it does show a warning - so that seems to be working fine.

I have also tried resetting the password for the admin, and that process seems to work fine, except I still can’t login.

I’ve had a search on google, and on the forum, and I can’t seem to get anywhere so any help would be appreciated.

I edited Varien.php as suggested in previous posts, and was able to load the dashboard, but every page request in the admin area required me to login again, but actions such as deleting notifications didn’t work.
I’d prefer not to have to edit the main Magento files, as it makes upgrades a pain.

The site was running Mangento 1.7.0.2 I believe. Both servers are running Debian, however the newer one is slightly more up to date - both are running PHP 5.3 and MySQL 5, it;s just minor revisions that are different. The apache setup is identical.

Thanks in advance!

EDIT:
------
Fixed!

If anyone else is having this issue, after much digging, I discovered the problem.

You need to set:

suhosin.session.encrypt = Off

in php.ini when working with suhosin.

Hope this helps someone else out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jeffcustom
Member
 
Avatar
Total Posts:  67
Joined:  2012-11-29
Boulder, CO
 

Sounds like you’ve done quite a bit of digging.  Only thing I could recommend is to make sure that you updated the admin area URL, too, to make sure it points to the test server vs. the live one?

 
Magento Community Magento Community
Magento Community
Magento Community
 
edmondscommerce
Guru
 
Avatar
Total Posts:  342
Joined:  2008-08-26
 

Hi mr_tom,

This problem usually occurs because the cookie domain is set and since you have moved domains it will now be set wrong.

Look for web/cookie/cookie_domain in the core_config_data tabel. Also web/cookie/cookie_path.
I recommend deleting them both as Magento will default to what will work.

 
Magento Community Magento Community
Magento Community
Magento Community
 
mr_tom
Jr. Member
 
Total Posts:  3
Joined:  2012-10-31
 

@jeffcustom: I’m certain I’ve updated all the URLs (unless there some hidden elsewhere in another table other than core_config_data, but I coudln’t find any reference to any.

@edmondscommerce: I’ve tried changing these values to the new server, and even setting them to what they were on the old server (both were NULL), and it hasn’t helped.

I have deleted the entries for web/cookie/cookie_path and web/cookie/cookie_domain, and I’m back at the stage where I can log in to the dashboard, but any page requests within the admin area require me to login again.

Cheers for the info guys - but unfortunately it’s not working lol. I’ll keep digging smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
mr_tom
Jr. Member
 
Total Posts:  3
Joined:  2012-10-31
 

Fixed :D

See ammendments to original topic.

Hopefully it can help someone else out.

 
Magento Community Magento Community
Magento Community
Magento Community
 
eCom
Member
 
Total Posts:  53
Joined:  2008-04-20
 

edmondscommerce digging helped.
Thanks!

Look for web/cookie/cookie_domain in the core_config_data tabel. Also web/cookie/cookie_path.

The difference I had was a dot: \".\"
Meaning, the url is: DOMAIN.com and the web cookie was .DOMAIN.com

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top