1

I deployed my laravel application in a shared hosting system and the application works fine, but every time I open the website for the first time in a new browser the first POST request that I make returns error 419, page expired. After that the system works fine, every POST is made correctly but I don't know why always this error happens the first time the system is opened in a new browser. The csrf_token is correct at the code.

<form method="POST">
            @csrf   

            <input class="fields" name="user" placeholder="Email"/><br/>
            <input class="fields" name="password" type="password" placeholder="Senha"/><br/>
            <input class="entrarbtn" value="Entrar" type="submit"/><br/>
</form>

1 Answer 1

2

just added this settings on php.ini and works now

; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)

output_buffering = 16384
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.