PHP does not compile installation of the OpenSSL extension implementation

Source: Internet
Author: User
Tags install openssl php source code
This time to everyone to bring PHP does not compile installation OpenSSL extension implementation, PHP does not compile installation of the OpenSSL extension of the attention to what, the following is the actual case, together to see.

When using the RSA algorithm in PHP, you need to call the Openssl_get_publickey method, but you also need to compile the OpenSSL extension to PHP, otherwise you will be prompted with the following error:

Call to undefined function openssl_get_publickey ()

Since PHP has been installed, how to install OPENSS without compiling it. This is done in the following way:

Go to PHP source code path

Cd/php-5.6.19/ext/openssl

Compiling with Phpize

CP CONFIG0.M4 CONFIG.M4 Phpize

The Configure file is generated so that you can use the make command to install

Special Note: You need to set the environment variables for the PHP installation path.

Perform a Make installation

./configure--with-php-config=/usr/local/cp-php-5.6.19/bin/php-config--with-openssl

Special Note: You need to install OpenSSL first

PHP.ini Add extensions to configure OpenSSL extensions

Extension=openssl.so

Verify that the increase is successful

Php-m

You can see all the extensions of PHP

Believe that you have read the case of this article you have mastered the method, more exciting please pay attention to the PHP Chinese network other related articles!

Recommended reading:

How the PHP generator uses

Request a refund from 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.