Php does not need to compile and install openssl extensions.

Source: Internet
Author: User
Tags install openssl

Php does not need to compile and install openssl extensions.

When using the RSA Algorithm in php, you need to call the openssl_get_publickey method, but you also need to compile openssl extensions for php. Otherwise, the following error is prompted:

Call to undefined function openssl_get_publickey ()

Since php has been installed, how can I install openss without compiling. The procedure is as follows:

Go to php source code path

Cd/php-5.6.19/ext/openssl

Compile with phpize

Cp config0.m4 config. m4 phpize

In this case, the configure file is generated, so that you can use the make command to install

Note: you need to set the environment variable of the php installation path.

Execute make to install

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

Note: openssl must be installed first.

Php. ini add Extension Configuration openssl Extension

Extension = openssl. so

Verify whether the addition is successful

Php-m

We can see all the extensions of php.

The above php implementation method without compiling and installing openssl extensions is all the content that I have shared with you. I hope to give you a reference and support for the help house.

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.