2

I recently set up a new Linux server for development

Then I went to my production Linux server that has my current magento website. I modified the configuration to use a new url like https://developmentarea.mysite.com then i cleared out the magento cache. Then I zipped up all the magento files and mysqldump the database.

i moved everything over to the new linux server. Installed the magento site. I am able to see the product pages on this new development area.

When I go to the admin area, and I'm asked to login, I am unable to. I put in my username and password, press submit, and i'm redirected back to the login page. I notice that once i'm redirected back to the login screen, there is no error message saying I entered the wrong username or password. I see in the browser url that this bit has been added https://dev.mysite.com/index.php/admin/index/index/key/4727dbc6df408ace4070a39aa72f9289/. This leads me to suspect that I perhaps I actually did login, but was kicked back out.

Does anyone know why I can't login to the admin area even though the database should be a copy of the production but with all the urls changes?

  • 1
    Did you delete everything in /var/session/ ? – Natalie Apr 27 '15 at 22:57
3

I had the same issue a while back - These steps fixed it for me

1) In PHPMyADMIN run this query:

SET SQL_SAFE_UPDATES=0;
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code = 'NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
SET SQL_SAFE_UPDATES=1;

2) Clear /var/cache/* and /var/session/*

3) Clear your browser cache/cookies

If that doesn't work make sure session and cache directories are writeable

0

Try this mysql query and check domain name is correct for all entries or not.

SELECT * FROM `core_config_data` WHERE `path` = "web/cookie/cookie_domain" or `path` LIKE "web/secure/base%" OR `path` LIKE "web/unsecure/base%"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.