Linux php add OpenSSL extension

Source: Internet
Author: User
Tags install openssl

Objective:

PHP Source Location: /usr/origindatas/php-7.1.11

PHP Installation Location: /usr/lnmp/php/php-7.1.11

PHP.ini Location: /usr/lnmp/php/php-7.1.11/etc/php.ini

1. Enter the extended directory for OpenSSL

In PHP source files
cd/usr/origindatas/php-7.1. /ext/openssl

2. Running

/usr/lnmp/php/php-7.1. /bin/phpize

If an error occurs

  fix : Execute in current directory, execute once above statement after completion

MV Config0.m4  CONFIG.M4

3. Performing the installation

Note the path
./configure--with-openssl--with-php-config=/usr/lnmp/php/php-7.1. /bin/php-config

Make install

If an error occurs during the installation:Libssl cannot find

Executes the following statement, after the completion of the above statement

Yum install OpenSSL yum install OpenSSL-devel

4. After execution, you will be prompted to generate an. os file under a path, usually under the PHP installation path. My is/usr/lnmp/php/php-7.1.11/lib/php/extensions/no-debug-non-zts-20160303

5. Open php.ini File

916 rows of places to add
Extension=openssl.so

6. Restart PHP to

Linux php add OpenSSL extension

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.