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.