Configure Apache server to support PHP file parsing Apache install Apache 2.4 Apache Ant

Source: Internet
Author: User
Tags php download
Description

1. In this case, the Apache version is HTTPD-2.4.20-X64-VC14 and the installation path is E:\Apache24

2. PHP version is php-5.5.34-win32-vc11-x64, the installation path is E:\php-5.5.34

Download

Login http://php.net/downloads.php Download PHP, because I want to integrate it with Apache, so I download here is the Thread Safe version;

Installation

1. unzip the downloaded file, this example I unzip the compressed package to the E-packing directory;

Configuration

1. Open the E:\Apache24\conf\httpd.conf file with a text editor and find #LoadModule vhost_alias_module modules/mod_vhost_alias.so and add the following configuration on its next line:

# load Phploadmodule php5_module "E:/php-5.5.34/php5apache2_4.dll" # to indicate the location of the PHP configuration file php.ini phpinidir "e:/php-5.5. 34 "
2. Find AddType application/x-gzip. gz. tgz and add the following configuration on its next line:
# defines the types of files that can execute PHP, that is,. php and. html files can execute PHP programs addtype application/x-httpd-php. php. html
3. The E:\php-5.5.34\php.ini-development renamed to E:\php-5.5.34\php.ini and opened the php.ini file with a text editor, to extension_dir = "./" Line , remove the comment and replace it with extension_dir = "E:/php-5.5.34/ext";
Extension_dir = "E:/php-5.5.34/ext"

4. Restart the Apache server;

Test
1. Write the test.php file and save the file to the Apache server's Web site path , the contents of the file are as follows:
 
  
2. Open http://localhost/test.php in the browser, when the following page appears, it means that Apache has supported the parsing of PHP files;


The above describes the configuration Apache server support PHP file parsing, including the Apache content, I hope the PHP tutorial interested in a friend helpful.

  • Related Article

    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.