1 year ago

#331135

test-img

milayton Cosmo

The CSRF token is invalid. Please try to resubmit the form. Symfony 4 with php-fpm7.4

When I submit a form I get the following error: "The CSRF token is invalid. Please try to resubmit the form."

It does not always happen, sometimes it is sent correctly, but no type of error logs me.

I have configured my php.ini increasing memory and limits, without result

php.ini:

upload_max_filesize = 48M 
post_max_size = 48M 
memory_limit = -1 
max_execution_time = -1
max_input_vars = 4000 
max_input_time = -1

UPDATE: I've modified my config file, it seems to work that way but I'm still testing. Still I would like to understand why saving it in memcached does not work

config/packages/framework.yaml

session:
    #handler_id: session.handler.memcached //old
    handler_id: session.handler.native_file
    save_path: "%kernel.root_dir%/../var/cache/sessions"

memcached

symfony4

fpm

php-7.4

csrf-token

0 Answers

Your Answer

Accepted video resources