The openssl extension is required for SSL/TLS protection
The openssl extension in PHP is required to provide SSL/TLS support.
The openssl extension in PHP is required to provide SSL/TLS support. SSL/TLS is a protocol used to secure network communications by encrypting data transmitted between client and server. If you are seeing a message that says that the openssl extension is required for SSL/TLS protection, it means that your PHP installation does not have the openssl extension enabled. Note that modern PHP versions enable this extension by default, so this guide mainly applies to older installations or custom builds.
How to enable the openssl extension in PHP?
To enable the openssl extension in PHP, you need to make sure that the extension is installed on your system and then edit your PHP configuration file (php.ini) to enable it. Here's how you can do that:
- First, check if the openssl extension is installed on your system by running the following command:
php -m | grep opensslIf the openssl extension is installed, you should see it in the list of installed PHP modules. If it is not installed, you need to install it first. (On Windows, the extension is typically included in standard PHP distributions and only needs to be uncommented in php.ini.)
- Next, open your PHP configuration file (php.ini) in a text editor. You can find the location of this file by running the following command:
php --ini- Find the line that says
extension=opensslin the configuration file, and remove the semicolon (;) at the beginning of the line. This will enable the openssl extension. - Save the configuration file and restart your web server or PHP-FPM process (e.g., Apache, Nginx, or PHP-FPM) for the changes to take effect.
That's it! The openssl extension should now be enabled and your PHP installation should be able to provide SSL/TLS support.