What to do if httpd php does not parse

藏色散人
Release: 2023-03-04 22:42:01
Original
3084 people have browsed it

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.

What to do if httpd php does not parse

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
Copy after login

Add below it:

AddType application/x-httpd-php .php //添加支持对php脚本解析
Copy after login

2. Find:


DirectoryIndex index.html
Copy after login

Change the middle line to:

DirectoryIndex index.html index.htm index.php //增加对php的索引
Copy after login

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!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!