Home > Backend Development > PHP Tutorial > php7 install openssl extension method

php7 install openssl extension method

不言
Release: 2023-03-25 07:18:01
Original
4583 people have browsed it

Let me share with you an article on how to install openssl extension in php7. It has a good reference value and I hope it will be helpful to everyone. Let’s take a look together

1. My source code is in /home/topsec/Documents/php-7.0.11, the installation location is in /usr/local/php7, and php.ini is in /usr/local/php7 /lib. If there is no php.ini, you need to rename the configuration file php.ini-development or php.ini-production in the source code to php.ini and place it under lib.

2. Enter the extension directory of openssl: /home/topsec/Documents/php-7.0.11/ext/openssl

3. Run phpize

/usr/local/php7/bin/phpize
Copy after login

4. Perform the installation

./configure --with-openssl --with-php-config=/usr/local/php7/bin/php-config 
make&&make install
Copy after login

5. During the process, libssl may not be found. Execute the following command and then execute it again. 4. Perform the installation

yum install openssl 
yum install openssl-devel
Copy after login

6. After performing the installation, you will be prompted to generate a .so file in a certain directory. The location I generated is /usr/local/ php7/lib/php/extensions/no-debug-non-zts-20151012/ Go to

7. Open php.ini

vim /usr/local/php7/lib/php.ini
Copy after login

Add the following two sentences

extension_dir = "/usr/local/php7/lib/php/extensions/no-debug-non-zts-20151012/" 
extension=openssl.so
Copy after login

8. Restart php.


The above is the detailed content of php7 install openssl extension method. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template