Home > Article > Backend Development > How to install openssl extension in php?
How to install the openssl extension in php: first find the openssl file in the php promotion directory; then modify [config0.m4] to [config.m4], and configure it in phpize; then compile, install, and configure [php.ini], add extensions; finally restart the php service.
How to install openssl extension in php:
1. First find the directory where php is promoted. Mine is in ' /usr/local/php-7.1.5/ext'
#2. Enter the openssl directory and modify the config0.m4
inside to config.m4
The execution command is "mv config0.m4 config.m4
"
./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config5. Compile and install successfully You will be prompted to generate a
.so file in a certain directory
##6. Configure
php.ini, add extensions
7. Restart the php service
/etc/init.d/php-fpm restart
##8 .To check whether the installation is successful, search the openssl module in phpinfo
Related learning recommendations:
PHP programming from entry to proficiencyThe above is the detailed content of How to install openssl extension in php?. For more information, please follow other related articles on the PHP Chinese website!