Apache does not execute PHP, display code

Source: Internet
Author: User

First check whether the installation of PHP, has been installed, first execute

Locate libphp5.so

Check if Apache has so files, if not, then reload PHP, first execute php-i | grep configure look at the previous configure parameters, and then at the end add--with-apxs2=/usr/local/apache2/bin/apxs Note that this is the directory where Apache is located, after reloading PHP, Modify the Apache configuration file httpd.conf

If not

LoadModule Php5_module modules/libphp5.so

Inside the <ifmodule mime_module>.

AddType application/x-httpd-php. php

AddType Application/x-httpd-php-source. Phps

Add the content, then restart Apache, execute apachectl-k Graceful

Apache does not execute PHP, display code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.