Home > Article > Operation and Maintenance > 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!