Tutorial is wrong

Hi there champions
i am loving your code camp.
I have been implementing the tutorial at here on UBuntu: How to Implement JSON Web Tokens (JWTs) in PHP – PHP Authentication Tutorial
I had to change the code of DB_PASS to DB_PASSWORD. I also updated the bootstrap.php file on line 17, to DB_PASSWORD as it drew an array error.
I have successulluy changed htese codes.
BUt, thee error persists. It says: Connection failed: SQLSTATE[HY000] [1045] Access denied for user ‘ffbnwzszfa’@‘localhost’ (using password: YES)

is there anyhelp?

DB_PASS is the key and 'db_password' is the value in the .env file.

Did you actually update the values in the .env file, because the values given are just placeholders.

Note: Before use, ensure to adjust or configure the variables in the .env environment file to match your database credentials.


If you help with your code, you should post a repo with it.

Hi champions

Yes, i updated the placeholder from DB_PASS to DB_PASSWORD. BUt it drew the same error once i updated bootstrap.php too.

Ahhh, i get it, its now passing hte same error as before, right?

Also, i have removed all quotes, the .env file looks like this now:

DB_HOST=localhost

DB_NAME=db_real_name

DB_USER=db_real_user

DB_PASSWORD=hnhjeienviieijf_Or the_real_password

SECRET_KEY=something from link provided

Should i revert back to how it was before? And put it as this instead:

DB_HOST = ‘localhost’

DB_NAME = ‘dbname’

Etc?

Or shouldi keep it as without the quotes?

Wishing you the best day.


Steve Cooper