This time I will bring you phpYou can install it without compiling itInstallationDetailed explanation of the openssl extension steps, PHP can install the openssl extension without compiling itNotesYes Which ones, the following are practical cases, let’s take a look.
When using the RSA algorithm in php, you need to call the openssl_get_publickey method, but at the same time you need to compile the openssl extension for php, otherwise the following error will be prompted:
Call to undefined function openssl_get_publickey()
Due to PHP has been installed. How to install openss without compilation? The steps for this method are as follows:
Enter the php source code path
cd /php-5.6.19/ext/openssl
Use phpize to compile
cp config0.m4 config.m4 phpize
At this time, Generate the configure file so that you can use the make command to install it
Special instructions: You need to set the environment for the php installation pathVariables.
Execute 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 to add extension configuration openssl extension
extension=openssl.so
Verify whether the addition is successful
php -m
You can see all the extensions of php
I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!
Recommended reading:
Analysis of steps to implement consistent HASH algorithm in PHP
Detailed explanation of security verification steps for PHP development api interface
The above is the detailed content of Detailed explanation of the steps to install openssl extension without compiling PHP. For more information, please follow other related articles on the PHP Chinese website!