How to Compile PHP With SSL

How to Compile PHP With SSL thumbnail
SSL encryption is a vital part of quality web applications.

As a language designed explicitly for developing web applications, PHP comes with most of the tools web developers need out of the box. However, the majority of websites only need Secure Socket Layer (SSL) encryption for creating a secure connection with users. This is done by the web server (i.e,. Apache), not by PHP. So SSL support does not come with PHP by default. To get it, you must install OpenSSL.

Instructions

  1. Install OpenSSL

    • 1

      Download the latest OpenSSL software from the OpenSSL website.

    • 2

      Install OpenSSL according to the instructions provided with it. Some aspects of installation may be different depending on your operating system or file system structure.

    • 3

      Make a note of the directory where OpenSSL is installed.

    Install PHP and Test

    • 4

      Download the latest PHP software from the PHP website.

    • 5

      Configure the installation process to include SSL support. Refer to the installation documentation on the PHP website. You will see that part of installation is creating the configuration command. In this command, you will need to include a directive to install SSL. This directive looks like "--with-open-ssl=" followed by the directory where OpenSSL is installed on your computer. So if OpenSSL is in "/usr/local/ssl," then your directive will be "--with-open-ssl=/usr/local/ssl." Place this directive at the end of your configure command.

    • 6

      Run the configuration command according to the installation instructions on the PHP website and finish the installation.

    • 7

      Check that SSL support was installed by creating a script that runs the "phpinfo()" command. When you run the script and look at the page it creates, you will see a lot of boxes containing information about your PHP installation. If you see a box whose header reads, "OpenSSL," then your installation was successful.

Tips & Warnings

  • Make sure you compile with the latest version of OpenSSL. You will be using this module to secure sensitive data, and bugs in OpenSSL are corrected with each release. If you don't use the most recent one, your software could be vulnerable to attacks.

Related Searches:

References

Resources

  • Photo Credit computer security concept - usb cable and padlock isolated image by dinostock from Fotolia.com

Comments

You May Also Like

  • How to Enable SSL and PHP

    Without proper security, the Internet wouldn't be as useful as it is. You need encryption to send information such as credit card...

  • How to Compile NRPE With an SSL Option

    Nagios is a sophisticated program designed to make it easy for Linux administrators to monitor dozens or even hundreds of systems from...

  • How to Use SSL With PHP

    PHP is a popular scripting language for programming dynamic websites and applications. Secure Socket Layer (SSL) improves the security of your website...

  • How to Compile a PHP File

    General-purpose PHP (Hypertext Preprocessor) is a scripting language that was intended for dynamic Web development. PHP code is saved into a PHP...

  • How to Configure SSL in PHP

    The Secure Socket Layer (SSL) protocol is a vital part of information security on the Internet. If your PHP application needs to...

  • How to Compile the Apache2 SSL

    The Secure Socket Layer (SSL) protocol is the basis for most of the secure e-commerce transactions on the Internet. By using end-to-end...

  • How to Compile a Python File

    Python is slightly different from most other programming languages, both higher- and lower-level, in that it does not need to be compiled...

  • How to Connect to a Login Using SSL

    SSL (Secure Socket Login) is the safest way to transport personal information across the Internet. SSL connections go through a website server...

  • How to Change a Font Type With PHP

    Fonts on websites, like all other text characteristics, are manipulated using HTML. The font type, as well as its font family, color...

Related Ads

Featured