Home > Operation and Maintenance > Apache > apache cannot parse php

apache cannot parse php

王林
Release: 2019-10-21 17:26:48
Original
3276 people have browsed it

apache cannot parse php

First install APACHE

 ./configure --prefix=/usr/local/apache2 --enable-so --enable-module=so
 make
 make install
Copy after login

Install PHP

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib 
--with-sybase=/opt/sybase/OCS-15_0/ --with-mysql --enable-dbase --enable-zip
 make
install
Copy after login

Install After completing PHP, execute the following code

cp php.ini-dist /usr/local/lib/php.ini
Copy after login

Add AddType application/x-httpd-php .php to the configuration file httpd.conf in APACHE, restart APACHE, and the same error still occurs.

Solution:

  AddType application/x-httpd-php .php
  AddType application/x-httpd-php .php .phtml .php3
  AddType application/x-httpd-php-source .phps
Copy after login

Recommended tutorial: apache tutorial

The above is the detailed content of apache cannot parse php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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