The solution to httpd php not parsing: first find "AddType application/x-gzip .gz .tgz"; then add the content as "AddType application/x-httpd-php .php" and save it.
Recommended: "PHP Video Tutorial"
apache does not parse php
I still don’t understand the parameters of apache well enough.
1. Find:
AddType application/x-gzip .gz .tgz
Add below it:
AddType application/x-httpd-php .php //添加支持对php脚本解析
2. Find:
<IfModule dir_module> DirectoryIndex index.html </IfModule>
Change the middle line to:
DirectoryIndex index.html index.htm index.php //增加对php的索引
It’s normal.
In addition, when compiling PHP, you need to call the apache module, --with-apxs2=/usr/local/apache2/bin/apxs
The above is the detailed content of What to do if httpd php does not parse. For more information, please follow other related articles on the PHP Chinese website!