Cannot log in after update from PHP 7.0 to 7.2

Nextcloud version: 16.0.1
Operating system and version: Centos 7
Apache or nginx version: nginx 1.12.2
PHP version: 7.2

I just upgraded from PHP 7.0 to 7.2 so I could upgrade to Nextcloud 16. After doing this, I cannot log in from the web interface. When I enter a username and password, whether correct or not, it simply redirects back to the same login page with no message given. The desktop client and mobile app appear to be working just fine. As far as I can tell this is a caching issue.

The issue here seems to be similar to mine, but the solution is not relevant to me as I was already using APCu caching, not Redis. I tried commenting out that line in my config.php and that didn’t seem to make any difference.

This post also seems relevant, but the solution is not descriptive. My session.save_handler in my php.ini is set to the default value.

Another issue here seems to be similar but the resolution seemed to be fixing an issue with Apache, and I’m using nginx.

I also cannot roll back to PHP 7.0 as Nextcloud 16 requires 7.1 or newer.

The solution I saw often was to adjust “/var/lib/php/session” permissions and users.

1 Like

Thank you!

For anyone else finding this post, more specifically what I did to fix this was to give ownership of /var/lib/php/session, /var/lib/php/opcache, and /var/lib/php/wsdlcache to nginx.

cd /var/lib/php
sudo chown -R nginx:nginx session/
sudo chown -R nginx:nginx opcache/
sudo chown -R nginx:nginx wsdlcache/

It appears that the update messed with the permissions and set the ownership to apache even though I use nginx and don’t even have apache installed.