Linux install OpenSSL extension under PHP

Source: Internet
Author: User
Tags install openssl

Most of the time, the OpenSSL component is used, the following is a description of Linux under the PHP installation OpenSSL extension:


    1. Install the OpenSSL component, the general PHP installation directory has many extension components of the installation package, of course, including OpenSSL, for example, my PHP installation directory is/data/php-5.4.32, then the installation directory of the OpenSSL component is/data/ Php-5.4.32/ext/openssl, and then do the following:

      (1) Cd/data/php-5.4.32/ext/openssl

      (2) MV Config0.m4 CONFIG.M4

      (3)/data/php/bin/phpize

      (4)./configure--with-openssl--with-php-config=/data/php/bin/php-config, if this step cannot find OpenSSL ' s <evp.h> The error executes the following command:

      Yum Install OpenSSL Openssl-devel

      Ln-s/usr/lib64/libssl.so/usr/lib/

      Then repeat (3) (4) Step

      (5) Make

      (6) Make install, successful installation will generate a directory containing openssl.so

    2. Modify the php.ini file, you should first set up a storage directory for the extension component, for example, my storage directory is/data/php/ext, then modify the Extension_dir in php.ini to Extension_dir = "/data/php/ext", Then add extension=openssl.so at the end of the extension, and finally save the file

    3. Restart PHP and Nginx

    4. Phpinfo See if OpenSSL is installed successfully


This article is from the "small white Plus small white" blog, please be sure to keep this source http://bxtser.blog.51cto.com/9259025/1671988

Linux install OpenSSL extension under PHP

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.