1

After installing Craft 3 successfully, I can't access the admin panel while using the correct credentials. I get an "invalid username or password" message.

1

I ran into two different issues that prevented me from logging into Craft CMS:

1) By default, Craft CMS uses PHP sessions and my PHP installation (via homebrew) had a blank value under "session.save_path". I updated my php.ini file and searched for "session.save_path", it was commented out, so I uncommented it. It now looks like this: session.save_path = "/tmp"

2) The second thing I noticed is that Craft CMS 3 uses the Yii 2 framework, diving into that framework I found a condition that checks a user's IP address. If the IP address is empty, then it rejects the user from logging in. In my case, I was using the built-in PHP local webserver (php -S localhost:8000) so my IP address wasn't being sent along in the requests. To fix this, I changed my setup to use NGINX instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.