Hi,
I had a running cakephp1.3 version several years ago and am now trying to built it new with cakephp4.x.
I am working with xampp on windows10 and followed the installation guidelines using composer and “bake all” with my existing database.
The first thing I was trying to add was authentication. I followed the tutorial int he cakephp4 cookbook: https://book.cakephp.org/4/en/tutorials-and-examples/cms/authentication.html
I am stuck at “Test it by requesting any page of your site. After being redirected to the /users/login page, enter the email and password you picked previously when creating your user. You should be redirected successfully after login.”
When requesting any page, I am not redirected to “localhost/MyApp/users/login” but to “localhost/users/login”, which of course gives an error. What is wrong here?
When I am trying to login, I always get the message, username or password are wrong. I tried to check that again, the tutorial suggests:
" If you don’t have a user with a hashed password yet, comment the loadComponent('Authentication.Authentication')
line in your AppController and go to /users/add
to create a new user picking email and password. Make sure to uncomment the lines we just temporarily commented!"
But when I uncomment the line, I get only error messages and can go to /users/add
any more. Is the tutorial wrong or is this a sign, that I did something wrong?