Home  >  Article  >  Backend Development  >  What should I do if apache cannot execute php?

What should I do if apache cannot execute php?

王林
王林Original
2020-08-05 13:28:304166browse

Solution to the problem that apache cannot execute php: 1. Open the apache configuration file httpd.conf; 2. Add the configuration [LoadModule php5_module "H:/amp/php/php5apache2_2.dll"]; 3. Restart apache That’s it.

What should I do if apache cannot execute php?

The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer

First open the main configuration file httpd.conf of apache , its location is: apache installation directory/conf/httpd.conf;

(Recommended tutorial: php graphic tutorial)

Then find the location of "Loading Module" , and add the following content at the end of LoadModule:

"LoadModule actions_module modules/mod_actions.so "

What should I do if apache cannot execute php?

Then add the following content at the end of the apache configuration file:

LoadModule php5_module "H:/amp/php/php5apache2_2.dll"

What should I do if apache cannot execute php?

(Video tutorial recommendation: php video tutorial)

Then start a new line to set the file with the php suffix, which will be executed by the php language module.

"AddType application/x-httpd-php .php"

What should I do if apache cannot execute php?

Finally restart Apache.

The above is the detailed content of What should I do if apache cannot execute 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