search
HomeBackend DevelopmentPHP7How to install openssl extension in php7

How to install openssl extension in php7: 1. Enter the openssl extension directory; 2. Run phpize; 3. Perform installation through "yum install openssl"; 4. Open php.ini and add "extension=openssl.so" ;5. Restart PHP.

How to install openssl extension in php7

The operating environment of this article: linux5.9.8 system, PHP7.0 version, DELL G3 computer

How to install php7 openssl extension?

php7 installation openssl extension method:

1. My source code is in /home/topsec/Documents/php-7.0.11, and the installation location is / usr/local/php7, php.ini is under /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

4. Execute the installation

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

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

yum install openssl
yum install openssl-devel

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

7. Open php.ini

vim /usr/local/php7/lib/php.ini

Add the following two sentences

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

8. Just restart php.

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to install openssl extension in php7. 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment