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

What should I do if apache does not execute php?

藏色散人
藏色散人Original
2020-08-29 10:51:033624browse

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.

What should I do if apache does not execute php?

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!

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