OpenSSL is a Secure Sockets Layer cipher library that includes key cryptographic algorithms, common key and certificate encapsulation management functions, and SSL protocols, and provides a rich set of applications for testing or other purposes.
After being exposed to a critical security vulnerability, OpenSSL found that most websites encrypted via the SSL protocol use an open source package called OpenSSL. The OpenSSL vulnerability not only affects websites that start with HTTPS, but hackers can also use the vulnerability to initiate a "heart Bleed" (Heartbleed) attack directly on the PC. It is analyzed that there is a large number of software on windows that use a vulnerable OpenSSL code base that could be hacked to crawl memory data on a user's computer.
Here is the introduction of PHP to open OpenSSL method, in most cases, OpenSSL is not open, to enable the need to make the following simple settings
windows open Method:
1: first check the php.ini; Extension=php_openssl.dll exists, if present, remove the previous comment '; ', if it does not exist, add Extension=php_openssl.dll.
2: Speak the PHP folder under: Php_openssl.dll, Ssleay32.dll, Libeay32.dll 3 files copied to the Windows\system32\ folder.
3: Restart Apache or IIS (Iisreset/restart)
At this point, the OpenSSL function is turned on.
Linux under Open method:
I am using the Brocade Data Cloud Host, PHP version: 5.2.14
The following scenario takes my host as an example to add the OpenSSL module support for PHP.
Some of the online answers say to recompile PHP, add configure parameters, and increase the support of OpenSSL. Here is a method that does not require recompilation.
If the server exists PHP installation package files Best, if you have deleted, go to download and Phpinfo page display version of the same PHP installation files, I here is php-5.2.14.tar.gz
Recommended to Sohu image download, NetEase image not found. Address: http://mirrors.sohu.com/php/
Connect to the host using the SSH tool.
The code is as follows:
# download to the/VAR/WWW/PHP5 directory Cd/var/www/php5wget http://mirrors.sohu.com/php/php-5.2.14.tar.gz# unzip the tar zxvf php-5.2.14.tar.gz# enter PHP's OpenSSL Extension Module catalog CD Php-5.2.14/ext/openssl//var/www/php5/bin/phpize # Here for your own phpize path, if not found, After using Whereis phpize find # Execution, find the error cannot find CONFIG.M4, CONFIG0.M4 is config.m4. Directly rename MV config0.m4 config.m4/var/www/php5/bin/phpize./configure--with-openssl--with-php-config=/var/www/php5/bin /php-configmakemake install# a directory of. so files (openssl.so) is returned when the installation is complete. In this directory, copy the openssl.so file to the extension_dir you specified in php.ini (find in the php.ini file: Extension_dir =), my directory here is var/www/php5/lib/php/ extensions# edit php.ini file, add extension=openssl.so# at the end of the file to restart Apache/usr/local/apache2/bin/apachectl restart
OK, now you have successfully added OpenSSL support.