ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

An Error Was Encountered. This form has expired. (after server migration)

May 06, 2014 4:38am

Subscribe [3]
  • #1 / May 06, 2014 4:38am

    Ian Ebden

    312 posts

    Hi guys. I’ve Google’d around a bit and tried various things but hit a brick wall with this one. Neither I nor my client can login to the control panel, after migrating from dev to live server. We both get the “An Error Was Encountered. This form has expired. Please refresh and try again” message. I’m trying to resolve this with the host but curiously, the host is actually able to login.

    I did have some SFTP/access issues with the host initially, until they tweaked their firewall. Might their still be some security issues blocking anyone outside their firewall from logging into the CP? Seems unlikely.

    Done 100s of similar migrations in the past and never had this before. DB and browser cache all clear. Front end of the website is fine BTW. Any ideas?

  • #2 / May 06, 2014 1:19pm

    Rob Allen

    3105 posts

    Are all your paths correct, no leftovers from dev URL? Cookie domain name?

  • #3 / May 06, 2014 3:27pm

    Ian Ebden

    312 posts

    Hi Rob. Thanks for helping out. I’m using Focus Lab’s master config, so paths are sorted. Also, tried:

    $env_config['cookie_domain'] = "";
    $env_config['cookie_path'] = "";
    $env_config['cookie_prefix'] = "";

    That what you mean by cookie domain?

  • #4 / May 07, 2014 7:53am

    Rob Allen

    3105 posts

    Yeh that’s what I meant by cookies 😊

    That’s a bit of a stinker, but looking at the common denominator I’d hazard a guess it’s still host/firewall as that’s already been an issue.

    Can you replicate the site on a different host/server and login ok, that may prove my point?

  • #5 / May 07, 2014 8:49am

    Ian Ebden

    312 posts

    Yep, got it running on a dev server (different host). Neither me nor my client can access the CP on the live server, only the host can. Definitely feels like a firewall thang to me.

  • #6 / May 07, 2014 9:18am

    Rob Allen

    3105 posts

    Maybe ask them to whitelist your IP address, and see if that works?

  • #7 / May 14, 2014 4:57am

    Ian Ebden

    312 posts

    Big thanks to Joel Bradbury for solving this one. I needed to add

    $config['disable_csrf_protection'] = 'y';

    to my config. Here’s why:

    It’ll be because the tokens have been generated on a different base domain, and then it’s moved and gotten stuck. Normally they’re regenerated when they’re detected as expired, but if it see’s them as not expired, but invalid it can get confused. The hashes are kept in exp_security_hashes, just emptying that table will do it too.

  • #8 / Aug 31, 2014 10:32am

    vladyn

    176 posts

    You guys save me!
    Thank you!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases