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

What should I do if apache cannot execute php?

王林
Release: 2023-03-03 20:18:01
Original
4256 people have browsed it

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 "
Copy after login

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"
Copy after login

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"
Copy after login

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!

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