Home >Backend Development >PHP Problem >What should I do if apache does not execute php?
The solution to the problem that apache does not execute php: first execute "locate libphp5.so"; then check whether APACHE has an SO file; then modify the APACHE configuration file "httpd.conf"; and finally restart apache.
Recommended: "PHP Video Tutorial"
apache does not execute PHP and displays code
First check whether PHP is installed. If it has been installed, first execute
locate libphp5.so
to check whether APACHE has an SO file. If not, then reinstall PHP. First execute php -i | grep configure Look at the previous configure parameters, and then add --with-apxs2=/usr/local/apache2/bin/apxs at the end. Note that this is the directory where APACHE is located. After reinstalling PHP, modify the APACHE configuration file httpd .conf
If not
LoadModule php5_module modules/libphp5.so
In 49a83bcd86452e5ad987d3b8d0ee008d
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
add these contents, then restart apache and execute apachectl -k graceful
The above is the detailed content of What should I do if apache does not execute php?. For more information, please follow other related articles on the PHP Chinese website!