<p>I ran into two different issues that prevented me from logging into Craft CMS:</p>

<p>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"</p>

<p>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.</p>

CC BY-SA 4.0
2019-06-13T18:22:39.947Z
2019-06-13T18:41:04.920Z
2019-06-13T18:41:04.920Z
Lara Hilal
<p>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.</p>

<login>
Invalid username or password
# Invalid username or password

(Asked by: username_0 on 2019-06-11)

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.

**Tags:** login

---

## 1 answers

### Answer by username_0 on 2019-06-13. Score: 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.


---

