PHP to open the OpenSSL method, most of the OpenSSL is not open, to enable the need for a simple setting
windows open Method:
1: First check php.ini, extension=php_openssl.dll whether exist, if present remove the previous annotation character '; ', if it does not exist, then add Extension=php_openssl.dll.
2: Speak php folder under: Php_openssl.dll, Ssleay32.dll, Libeay32.dll 3 files copied to WINDOWSsystem32 folder.
3: Restart Apache or IIS (Iisreset/restart)
At this point, the OpenSSL function is turned on.
Linux to open the method:
I am using Kam still data Cloud host, PHP version: 5.2.14
The following scenario takes my host as an example to add OpenSSL module support for PHP.
Some answers on the internet say you want to recompile PHP, add configure parameters, and increase OpenSSL support. Here is a method that requires no recompilation.
If there is a PHP installation package file on the server best, if deleted, go to download and Phpinfo page display version of the same PHP installation file, I am here php-5.2.14.tar.gz
recommended to Sohu Mirror download, NetEase Mirror did not find. The address is: http://mirrors.sohu.com/php/
Connect to the host with the SSH tool.
. The code is as follows:
# Download to/var/www/php5 directory
Cd/var/www/php5
wget http://mirrors.sohu.com/php/php-5.2.14.tar.gz
# decompression
Tar zxvf php-5.2.14.tar.gz
# Enter PHP's OpenSSL extension Module directory
CD php-5.2.14/ext/openssl/
/var/www/php5/bin/phpize # Here for your own phpize path, if not found, use Whereis phpize to find
# After the execution, found that the error can not find Config.m4, CONFIG0.M4 is config.m4. Direct rename
MV Config0.m4 CONFIG.M4
/var/www/php5/bin/phpize
./configure--with-openssl--with-php-config=/var/www/php5/bin/php-config
Make
Make install
# After the installation is complete, a directory of. so files (openssl.so) is returned. Under this directory, copy the openssl.so file to the extension_dir you specified in php.ini (Find in php.ini file: Extension_dir =), my directory here is var/www/php5/lib/php/ Extensions
# edit php.ini file, add at end of file
Extension=openssl.so
# Restart Apache
/usr/local/apache2/bin/apachectl restart
OK, now you can successfully add OpenSSL support.