# Invalid CSRF token at install

**URL:** https://forum.mautic.org/t/invalid-csrf-token-at-install/2580
**Category:** Product Support
**Created:** [October 13, 2015, 2:33pm UTC](https://forum.mautic.org/t/invalid-csrf-token-at-install/2580 "2015-10-13T14:33:03Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![jfgrissom](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@jfgrissom](https://forum.mautic.org/u/jfgrissom)
#### Post date: [April 11, 2016, 12:00am UTC](https://forum.mautic.org/t/invalid-csrf-token-at-install/2580/10 "2016-04-11T00:00:58Z")

</div>

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.

```auto
# 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
```

```auto
# Centos 7
chown -R nginx:web /var/www/<non-public-directory>/sessions
systemctl restart php-fpm
```

---

_[View the full topic](https://forum.mautic.org/t/invalid-csrf-token-at-install/2580)._
