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-mysql
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!