2017.8.15
Ding-dong, development and search.
Say a test server on PHP without OpenSSL
Need to use this
All right, give the development a good fit.
Everybody knows PHP has a script that's phpize.
Then use this to extend the next OpenSSL.
The provincial recompile la La La
PHP version 5.4.45
Actually, the version has no eggs.
Just make sure you now have the same version and download the PHP package as you can.
*php official website Download link, call me brother K
wget http://cn2.php.net/distributions/php-5.4.45.tar.gz
Extract
TAR-ZXVF php-5.4.45.tar.gz
Go to the location of OpenSSL
CD Php-5.4.45/etc/openssl
Locate your phpize script path and execute it in the Php-5.4.45/etc/openssl directory
Find/-name Phpize
/usr/local/php/bin/phpize
Error (Cannot find CONFIG.M4), direct replacement
MV Config0.m4 CONFIG.M4
Re-execute
/usr/local/php/bin/phpize
Compiling the installation
./configure--with-openssl--with-php-config=/usr/local/php/bin/php-config
Make
Make install
Find the Modules directory, there will be a file called openssl.so
CD modules
Transfer so to the folder you are accustomed to
MV openssl.so/usr/local/php/lib/php/extensions/
Modify your PHP configuration file
Vi/etc/php.ini
Find this line, modify
Extension_dir = "/usr/local/php/lib/php/extensions/"
Add at the bottom
Extension=openssl.so
OK, here you are, you're done.
Restart Php,nginx
Let's start your test, Brother K.
This article is from the "kevinzhang91" blog, make sure to keep this source http://kevinzhang91.blog.51cto.com/12012510/1956338
lnmp,php open OpenSSL, function extension, K-brother