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

apache cannot parse php

王林
王林Original
2019-10-10 17:50:453236browse

apache cannot parse php

First install APACHE

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

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

Install After completing PHP, execute the following code

cp php.ini-dist /usr/local/lib/php.ini

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

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!

Statement:
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
Previous article:how to start apacheNext article:how to start apache