#Help whit a login form on php script

37 messages · Page 1 of 1 (latest)

ocean scarab
#

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

#

@green veldt @ruby umbra is a new post

high current
#

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

ocean scarab
#

but how do you fix the wrong login

ocean scarab
high current
#

Yes, because no cookies are being set

ocean scarab
#

so that would be the problem of that error

high current
#

If you use https it will work better

ocean scarab
#

how can it be solved?

green veldt
high current
#

By using https
Or (in local development), setting the environment variable SESSION_SECURE_COOKIE=false

green veldt
#

Your site isn’t being served via HTTPS. Your site should be served via HTTPS. Therefore the solution is to use HTTPS!

ocean scarab
high current
#

You don't want to do that for production, only local development.

For instance in the .env file

ocean scarab
high current
#

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.

high current
#

"Network", and then "Response headers"

ocean scarab
#

however this is the public_html directory of the site you see

ocean scarab
high current
#

That interface probably hides files beginning with a dot

ocean scarab
#

yes

ocean scarab
# high current

so can you just tell me what code i need to modify please. Thank you

high current
#

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

ocean scarab
#

Ok I’ll try to do this and I’ll let you know

ocean scarab
#

its working!!!!!

#

BUT THE PHP IS RESET

ocean scarab
#

no don't working

#

the website not responsive

high current
#

So what did you change?

high current
#

That doesn't affect the ability for the server to respond