Jump to content

Recommended Posts

Posted

Possibly a silly question from a phpvms V7.

Sometimes when saving or doing other stuff on the website I get a 419 Page Expired.
In this case particularly when trying to save the newly acquired VMS license, but it's not the only example.
Any tips? What am I missing?

Screenshot 2025-01-27 210844.png

  • Administrators
Posted

To clarify... you're entering your vmsACARS license into your phpVMS v7 admin panel - and pressing save caused the 419 error?

 

This really has nothing to do with vmsACARS. I moved your post to phpVMS General Discussions.

 

My first guess is it's a CORS error. Be sure your .env file is using https for your site URL and that the URL you are accessing is usimg https as well.

 

Here's a bunch more possibilities...

https://www.bacancytechnology.com/qanda/laravel/laravel-post-request-error-419-session-page-has-expired

Posted

Hi @William, are you getting this error on Windows, if so which browser?

 

To secure form processing, v7 uses csrf tokens to have protection against https://en.wikipedia.org/wiki/Cross-site_request_forgery issues. I saw some android devices are not liking it much and returning 419 (Page Expired) instead of logging you in (but accepts login and/or form data).

 

More info from Laravel : https://laravel.com/docs/10.x/csrf

 

So if you are always getting the same error in a specific case or theme, I would advise checking the theme and/or form, it may have missing elements, but if it is random and happens rarely, it can be timing or something else.

 

Hope this helps

Posted (edited)

Hey, yes I was reading about csrf tokens and trying to figure it out with the help of ChatGPT, but to no avail yet.

I will follow ProaAvia suggestions as well and investigate that too. And yes, it has nothing to do with vmsAcars specifically and it is browser irrelevant as it happens with any of them....

The installation is fairly vanilla yet, and there are no themes or mods at this time. Everything is still the "factory" default.
I updated it to 7.02 and it did so correctly, flushed all the caches, but I still get the error. The page doesn't even try to load, it just immediately goes to 419.

I think there must be some setting server side in the VPS that causes this. I turned off all kinds of server caching mechanisms and still trying to figure out where the solution is :)

Edited by William
Posted

Sometimes I am telling you I want to bang my head against the wall.......
You wouldn't believe what the issue was! The php.ini had all values post_max_size, memory_limit, etc. set to numbers without the M at the end so in reality they were all KB.

Fixed that, all issues disappeared smh.

Sorry for wasting y'all's time!!

  • Haha 1
  • Administrators
Posted

Glad you found the cause.

And now there is another tidbit of info here for someone else to see when they have the same issue.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...