Invalid CSRF token at install

Hi,

Just wanted to say thanks for this. I was seeing this same “The CSRF token is invalid. Please try to resubmit the form.” error during the install.

Telling php to use a directory where it had permission did the trick for me.

Hopefully this is helpful to someone else:
I have nginx/php-fpm running mautic and pointing php sessions to a location that nginx had rw access too.

Here is what I did to get it working for me.

# Centos 7
# /etc/php-fpm.d/www.conf
[www]
listen = /var/run/php5-fpm.sock
listen.owner = nginx
listen.group = web
listen.allowed_clients = 127.0.0.1
user = nginx
group = web
pm = dynamic
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
slowlog = /var/log/php-fpm/www-slow.log
php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on
php_value[session.save_handler] = files
php_value[session.save_path] = /var/www/<non-public-directory>/sessions
# Centos 7
chown -R nginx:web /var/www/<non-public-directory>/sessions
systemctl restart php-fpm