Home > Article > Backend Development > What should I do if apache cannot execute php?
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.
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 "
Then add the following content at the end of the apache configuration file:
LoadModule php5_module "H:/amp/php/php5apache2_2.dll"
(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"
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!