July 28, 201016 yr Hi all, With regards to the secure socket layer (https) does a user have to login from here or can i include a php login form that will connect to the database through the https? In other words say my main root directory is http//www.mysite.com/index.php and in the homepage I have an include file called login.php from https//secure.mysite.com/ will this work or will this be essentially negating the point of having the SSL? Thanks in advance Wayne.
July 28, 201016 yr Hi all, With regards to the secure socket layer (https) does a user have to login from here or can i include a php login form that will connect to the database through the https? In other words say my main root directory is http//www.mysite.com/index.php and in the homepage I have an include file called login.php from https//secure.mysite.com/ will this work or will this be essentially negating the point of having the SSL? Thanks in advance Wayne. To be honest as long as the script thats passing the information is on the SSL connection yes u should be able to include the login form
July 28, 201016 yr Hi all, With regards to the secure socket layer (https) does a user have to login from here or can i include a php login form that will connect to the database through the https? In other words say my main root directory is http//www.mysite.com/index.php and in the homepage I have an include file called login.php from https//secure.mysite.com/ will this work or will this be essentially negating the point of having the SSL? Thanks in advance Wayne. Hi Wayne, Short: Your login page has to be https://secure.mysite.com/index.php for it to all be secure. Long: HTTPS works between the users browser and the web server. Generally I think php includes from a remote location are a "bad thing", and you gain nothing from it because the user is still seeing the un-secure page. In order for the login process to be secured, it should start and finish on a https page. This is so that the information the user submits is encrypted, which is the entire point of https. Hope that wasn't too rambly First time giving advice like this in a while! Rob
July 28, 201016 yr Author Thanks guys for your responses. Nice bit of info. Will keep the login to the HTTPS area Cheers, Wayne. Just to clarify say I wanted to still include the login.php as mentioned above on my index.php page (which is not in the https domain) would i need to use something like an iframe as I dont really see any other way around it?
July 28, 201016 yr It doesn't really matter what PHP is including and where its getting it from, as long as the login form action is posting data to the https server then its fine.
July 29, 201016 yr Yea i agree with jock, like i said earlier its ok if u include files outside of the https server just as long as the script that is processing the login info is on the SSL connection it will be secure.
July 29, 201016 yr Includes have nothing to do with the http/https Does your hosting separate the two? ie have folders for your https and http in separate locations? You include using the file system of the server, not over http/https. If you do that, then the PHP of the include will be executed before it's added to your script, making any php in it effectively useless
July 30, 201016 yr Author No my hosting server does not have http / https folders, just public_html etc. So if I understand this right I can include a php file from any location in the http but as long as the form submits to the https area its ok? Thanks for the replies
July 30, 201016 yr Umm well yeah, but I just think you need to forget includes and http as one combined entity When PHP includes a file, it is essentially adding the content of a file to the location it's included and executing it as part of the script This is done through the file system, and can get any file on the server whatsoever that the user the script is running under has access to that file and location This is just a normal file read, it doesn't require you to use HTTP or HTTPS, hell you don't even need a web server running on the machine to include the file As for the form posting, it would be best if the whole thing was in a secure area. say for instance someone passes their email and password via HTTPS, but they get the pass wrong and you send them back to a HTTP url with their email filled in again, you're kind of defeating the object. Just stick to HTTPS for all of it
Create an account or sign in to comment