publicForm > Form expired

This topic is: not resolved

This topic contains 12 replies, has 7 voices, and was last updated by  PG Lewis 9 months, 1 week ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #160984

    OloaP
    Member

    I also have the same problem, with a fresh installation. I get the "Session Expired" message even if I click instantly on the Submit button.

    #160985

    OloaP
    Member

    Problem solved. The "session.save_path" directory wasn’t writable. Now everyting is working well!

    #160983

    kaiiser
    Member

    even when loading the form new and instantly submitting, i´m getting constant warnings, that the form expired…

    #160986

    nicomollet
    Member

    I am getting this "Error : The form has expired".

    It appears in :
    * my publicForm
    * the shorter form done with "pods_ui_manage"

    but it doesn’t appear in the regular form.
    If the trick is to make session save_path writable, I am affraid I can’t do that : I am on a shared hosting solution.

    Is there another solution ?

    #160987

    sc0ttkclark
    Keymaster
    Post count: 804
    #168141

    nandocoelho
    Member

    Hi,
    I made a simple form with the Pods UI, but now I am blocked with the error:
    “This form has expired. Please reload the page and Ensure your session is still active.”
    I have looked for a solution on the forum and also googled’it but can not find how to solve the problem.

    The error is with a fresh installation of WordPress. The server is a Plesk VPS with the following definitions taken from the PHP phpinfo () function:

    session
    Session Support enabled
    Registered save handlers files user
    Registered serializer handlers php php_binary wddx
    session.cache_expire 180 180
    session.cache_limiter nocache nocache
    session.cookie_lifetime 0 0
    session.gc_maxlifetime 1440 1440
    session.name PHPSESSID PHPSESSID
    session.save_handler files files
    session.save_path /var/lib/php/session /var/lib/php/session

    I have tried to give permissions to the /var/lib/php/session folder -rwx rwx rw- where everyone can write and read, but did not resolve.
    Also I I disabled the other plugins :
    - NextGEN-Gallery
    - Grunion Contact Form

    The strange thing is that installing WinXP on my personal computer works well, even with two active plugins:

    I had developed so many PHP code to use this plugin and now i’m stucked.

    Please does anyone know how to help me?

    #168143

    PG Lewis
    Keymaster
    Post count: 199

    I’ve run into this myself on a recent site. I got the error with a fresh WP install, fresh Pods install, created one simple Pod with a couple fields, then tried to create a record in the Pods admin. If you strip down to that do you still get the error? Or did this only start creeping in when you added extra Pods UI code? I’ve checked the mentioned settings in other threads and everything appears to be okay, but it’s failing regardless.

    I haven’t found the cause nor a fix yet but I will keep you posted on anything I find. In order to keep it from road-blocking development I made a hack to my /wp-content/plugins/pods/ui/ajax/api.php. The failing check is in the process_save_pod_item() function, at the top. I’ve simply bypassed the call and subsequent check of pods_validate_key by commenting those three lines out. This is obviously not an acceptable long-term solution and the site is done and soon to go live, so I’m going to have to dig into it much sooner than I’d like :/.

    #168144

    PG Lewis
    Keymaster
    Post count: 199

    I rolled up the sleeves, uncommented the workaround hack…. aaaaaaand no error now.

    I’ve suspected something weird and wrong on the hosting end all along, it was just going to be a fiddly matter of finding out /what/. Apparently they’ve straightened out the problem before I even had to put in a ticket. I wish I could get more things to solve themselves.

    #168146

    nandocoelho
    Member

    @PG Lewis Many many Thanks… for sure I had started creeping :s

    I had not carefully explained before. The form in question is a Pod created in the Admin area without any intervention or any change to the code by me, I just do PHP programming for presentation in the public areas along with the HTML by going to the API’s of WordPress and in this case the Pods Framework. What I could not do was simply add a new, or any, record from the Admin area to a simple Pod with three fields [Name][Slug][Quantity(num)].

    @PG Lewis said:
    «…
    I haven’t found the cause nor a fix yet but I will keep you posted on anything I find. In order to keep it from road-blocking development I made a hack to my /wp-content/plugins/pods/ui/ajax/api.php. The failing check is in the process_save_pod_item() function, at the top. I’ve simply bypassed the call and subsequent check of pods_validate_key by commenting those three lines out.
    …»

    I followed your tip and did almost the same. I just add a comment to the two lines if (false === $columns) and subsequent action die(“This form has expired. Please reload the page and ensure your session is still active.”);

    That worked for me. :-D
    Now I can add records to Pods. That is very cool but very strange. :-|

    So, is it too risky to deliver a website with this solution/hack?

    #168161

    PG Lewis
    Keymaster
    Post count: 199

    Those checks are in place to thwart bad guys from spoofing session information to try to do bad things (TM). It’s never a good idea to bypass security measures, so I wouldn’t consider commenting those lines out as an acceptable permanent solution.

    My ongoing saga is this:

    * The site did NOT fix itself, I was brain dead and didn’t hit the magic button to copy the changes to the server. It was late :)

    * Further troubleshooting found that, not only was my session save path unwritable… it didn’t even exist. This is a job for a hosting ticket.

    * Due to unrelated technical issues, we’ve moved the site to another host. The problem goes away on its own again.

    We may or may not follow up to get the broken hosting account fixed, but it looks like it’ll be a tech support fix if we do.

    A quick bit of test code to check some of the known culprits on this issue

    #168164

    blogmylunch
    Member

    I’m getting this error when I try to use the form in the dashboard (backoffice). Never even got to the point of public form yet.
    .
    My host is Fatcow.

    Nofia

    #168167

    blogmylunch
    Member

    OK, just so you all know. I had switched my PHP to 5.3 before I got this error.

    I read the threads on this issue. thought about what I had changed in PHP.ini. Nothing. But i went back into my server PHP sets and saw I had updated to PHP 5.3 so changed back to PHP 5.2 and the error has gone away.

    In short, the plugin seems to be incompatible with PHP 5.3.

    Hope this helps someone.

    Nofia

    Fatcow note on PHP 5.3:
    Information About PHP 5.3
    PHP 5.3 introduced significant positive changes to PHP. However, some older applications may not work with PHP 5.3, as some php.ini directives are not compatible with PHP 5.3+ (e.g register_globals or cgi.force_redirect). If you are having issues, PHP 5.2 is available for backwards compatibility.

    #168174

    PG Lewis
    Keymaster
    Post count: 199

    I have 2 recently started websites that are hosted on Fat Cow and both have had this problem. The value for the session save path was set to:

    /var/php_sessions

    but that directory does not exist. This is NOT a problem with PHP 5.3 compatibility and I do NOT advice downgrading to an older version of PHP. Check your session save path with the code snippet here:

    http://pastebin.com/Jz67naYm

    If the session save path is not writable or doesn’t exist (this was the case for BOTH new Fat Cow accounts) then contact your hosting and have them fix it. It is your hosting that is broken, not PHP 5.3.

Viewing 13 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic.

Wordpress Cloud Hosting