I have a problem with a php script and the login form doesn't work I think it's a lavrev problem in the form. If anyone can help me I put the github link with the resource file where the php pages are. Thank you! the second link is precisely the link of the site and if you still try to access the login with [email protected] and pw: admin does not work from the error in the attached image please help me thanks!
https://github.com/filipinso/php-videoplatform
http://bestfilmflix.c1.is/login
#Help whit a login form on php script
37 messages · Page 1 of 1 (latest)
You can see the reason cookies are not set in Chrome devtools
You want to use https.
There is also a setting to not require https in development, SESSION_SECURE_COOKIE=false
but how do you fix the wrong login
you tried to log in with the credentials and then the error attached in the real image comes out
Yes, because no cookies are being set
so that would be the problem of that error
If you use https it will work better
how can it be solved?
Read.
By using https
Or (in local development), setting the environment variable SESSION_SECURE_COOKIE=false
Your site isn’t being served via HTTPS. Your site should be served via HTTPS. Therefore the solution is to use HTTPS!
how do you set the variable you told me? , sorry but I'm learning
You don't want to do that for production, only local development.
For instance in the .env file
i changed what it said in the session.php file but it still gives the error
i don't have .env file
Look in Chrome dev tools. Now it's complaining that you have set same-site to None, which is not allowed in combination with non-secure cookies.
You really want to use https, but you probably also want lax as the same-site setting.
where?
however this is the public_html directory of the site you see
i try
That interface probably hides files beginning with a dot
yes
so can you just tell me what code i need to modify please. Thank you
Using https is the actual solution, but I can't help you with that.
But to modify the same-site setting, it's 'same_site' => 'lax', in session.php
Ok I’ll try to do this and I’ll let you know
So what did you change?
I change this
That doesn't affect the ability for the server to respond