Home >Backend Development >PHP Problem >How to install openssl extension in php?

How to install openssl extension in php?

coldplay.xixi
coldplay.xixiOriginal
2020-07-10 15:49:365002browse

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?

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'

How to install openssl extension in php?

#2. Enter the openssl directory and modify the config0.m4 inside to config.m4The execution command is "mv config0.m4 config.m4"

How to install openssl extension in php?

##3. Enter phpize '/usr/ local/php/bin/phpize '

How to install openssl extension in php?

4. Configure

./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config

How to install openssl extension in php?

5. Compile and install successfully You will be prompted to generate a

.so file in a certain directory

make

sudo make install

How to install openssl extension in php?##6. Configure

php.ini

, add extensions

How to install openssl extension in php?7. Restart the php service

/etc/init.d/php-fpm restart

##8 .To check whether the installation is successful, search the openssl module in phpinfoHow to install openssl extension in php?

How to install openssl extension in php?Related learning recommendations:

PHP programming from entry to proficiency

The 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn