This time I will bring youphpnot compilinginstallationimplementation of openssl extension, php does not compile and install openssl extensionWhat are the precautions, here are Let’s take a look at practical cases.
When using the RSA algorithm in php, you need to call the openssl_get_publickeymethod, 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:
PHP’s WeChat refund application
The above is the detailed content of PHP does not compile and install the implementation of openssl extension. For more information, please follow other related articles on the PHP Chinese website!