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

How apache supports php7

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Editor to share with you how apache supports php7, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's learn about it!

Apache supports the setting method of php7:

1. Modify SRVROOT. Here, the installation path of apache is defined, which is equivalent to a variable. This variable will be used in many places later.

# modify line 37 to change it to Define SRVROOT "D:\\ Program Files\\ Apache24"

2. Find LoadModule, and add the following configuration after it to know the address of php module and php configuration file.

LoadModule php7_module "D:\\ Program Files\\ php-7.3.5\\ php7apache2_4.dll" PHPIniDir "D:\ Program Files\\ php-7.3.5"

3. Modify the root path, DocumentRoot and Directory, and change it as follows:

DocumentRoot "${SRVROOT} / www"

4. Add a configuration to let apache recognize php files.

AddType application/x-httpd-php .php

5. Install apache as a system service

# install / uninstall apache service httpd-k install/remove# start / shut down / restart apache service httpd-k start/stop/restart

6. whether the test is successful or not. Create a new phpinfo.php file under the D:\ Program Files\ Apache24\ www path, as follows:

The above is how apache supports all the content of php7, thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Servers

Wechat

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

12
Report