Funky login issue with admin panel on scotch box

Hi folks, I’m running into a funky issue with getting grav + admin working on a virtual machine (scotch box 3.5 running Ubuntu 16.04.2). Basically, I keep getting redirected back to the login screen without any validation happening (i.e., I get the same behavior if I am using the user name password or just random typing). I’m not seeing anything in the logs/grav.log and I don’t see any PHP errors in the logs either. I created the user account using the CLI tools and those work without any problems, so I’m running out of ideas of what else might be going wrong. Previous work that I did: upgrading the vm from PHP 7.0 to PHP 7.2. Would PHP 7.2 be an issue? Or any other thoughts on what to look at?

@msqueeg, I have seen a similar issue last week on the forum…

The problem was caused by disabling the initialization of sessions. In that case, cookies cannot be created and hence the user cannot login.

See the ‘session.initialize’ config in '/user/config/system.yaml`, or ‘/system/config/system.yaml’ (which should never be edited!):

session:
    initialize: false    # When set to false, user will loop in login form.

thanks pamtbaau, unfortunately that doesn’t seem to have any effect on my setup. the session intialize is set to true. I tried messing around with some of those settings and they don’t seem to have any effect.

@msqueeg, then, saidly, I have no more suggestions for you… Maybe a last one: You could check using de devtools of your browser if cookies are being set.

Just for anyone curious about this, the issue was with the virtual machine I was using. I moved over to Laravel’s homestead and everything started working correctly. The moral of the story is probably to avoid using development environments that don’t aggressively update (like the free version of Scotch Box) for grav.

1 Like