Home > Article > Backend Development > What should I do if apache2 cannot parse php?
Solution to the problem that apache2 cannot parse php: 1. Install the "libapache2-mod-php7.0" module and restart apche; 2. Add the content "SetHandler application/x-httpd" to "apache2.conf" -php".
Recommended: "PHP Video Tutorial"
apache2 cannot parse php code after installation
Symptom of the problem: After installing apache and php5, the php code cannot be executed and the php code is output directly in text format.
Solution:
Divided two steps (1) Install libapache2-mod-pHP7.0 module, use command lines
r Code ending with php can be parsed normally, but phpmyadmin still cannot be executed. (2) To solve the problem of phpmyadmin still outputting the original text after the first step, add the following code to apache2.conf (apache’s configuration file, if you don’t know the path location, Baidu), and then restart apachesudo apt-get install php7.0-mysqlAll in all, there should be no problems if you follow the link below to install it. If you do not follow the link below initially, the above process is a remedial measure. This remediation process is also for my computer. Your computer may have more things that are not installed. It’s better to read the following article carefully to see if you are missing anything.
The above is the detailed content of What should I do if apache2 cannot parse php?. For more information, please follow other related articles on the PHP Chinese website!