0

I'm using EE v .3.4.4 and have used a dump of the site's live database to keep my development machine in sync from time to time. This has not been a problem in this project until last week.

After importing the live DB last week, I was unable to login to the CP. I have the continual loop of the login page being redisplayed.

So I cleared the exp_security_hashes table and the exp_sessions table.

This did not fix the issue. Adding $config['cookie_domain'] = ""; to master config works.

But I do not want to keep this as a fix as this is not the correct cookie domain.

What is the correct permanent solution for this?

Thanks in advance.

Dorothy

0

A pretty simple solution is to set configurations based on environment. This is a hacky example, but totally works. For a single variable, you could do this in your config file:

if ($_SERVER['SERVER_NAME'] == 'mysite.local'){
    $config['cookie_domain'] = "";
} else {
    $config['cookie_domain'] = "mysite.com";
}

There are way more robust ways to do this. Look into setting environment variables via your environment.

| improve this answer | |

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.