lnmp,php open OpenSSL, function extension, K-brother

Source: Internet
Author: User


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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.