esafwan
esafwan

Reputation: 18009

SSL in php/drupal website

In One of the website am creating there is a requirement to use ssl. But i have no idea about this whatsoever. I know ssl is for secure sites. But what difference will be there in development and where do i get started? I saw this http://php.net/manual/en/book.openssl.php and this http://www.openssl.org/ so it possible to do this without buying an ssl with open ssl?

I guess this how u detect....

if (isset($_SERVER['HTTPS']) )
{
    echo "SECURE: This page is being accessed through a secure connection.<br><br>";
}
else
{
    echo "UNSECURE: This page is being access through an unsecure connection.<br><br>";
}

Please tell me where to get started and the basics i need to know.

Upvotes: 0

Views: 810

Answers (2)

Graham
Graham

Reputation: 667

It also makes a difference if your site has some secure pages and some insecure ones. There is a module called "securepages" that makes most of that really easy. Of course, you still have to set up the certificate as the people mentioned above.

Upvotes: 0

deceze
deceze

Reputation: 521995

SSL is usually negotiated by the web server. You need to install a certificate that the web server will use to negotiate a secure connection with each client, before PHP is even invoked. And yes, you will need to pay for an officially validated certificate. Usually you can do all this very easily through your hosting provider. If you need more help on installing a certificate yourself, try http://serverfault.com.

Ideally, for your development this means nothing at all. If your website doesn't make any presumptions to be running on a secured or unsecured connection, it should run fine either way, since the web server is handling the details for you. If you are generating full links yourself (including the schema, http://), you must be careful there. If you're setting any cookies, you should check whether these have the secure flag or not and what that means for your system.

The OpenSSL extension doesn't have much to do with any of this in this context.

Upvotes: 3

Related Questions