Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method for php7 to install the openssl extension

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

The main content of this article is to explain "what is the method of installing openssl extensions in php7". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "what is the method of installing openssl extensions on php7?"

Php7 install openssl extension method: 1, enter the openssl extension directory; 2, run phpize;3, through "yum install openssl" to perform the installation; 4, open php.ini to add "extension=openssl.so"; 5, restart PHP.

This article operating environment: linux5.9.8 system, PHP7.0 version, DELL G3 computer

How does php7 install the openssl extension?

Php7 install openssl extension method:

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 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 put 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. Perform installation

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

5. Libssl may not be found during the process. Execute the following command and then re-execute 4. Execute the installation.

Yum install opensslyum install openssl-devel

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

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. Restart php.

At this point, I believe you have a deeper understanding of "what is the method of installing openssl extensions in php7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report