How to configure Apache to support PhP5

Source: Internet
Author: User

1. Download the Apache installation package and install it.
2. Download the zip package of PhP5 and decompress it to C: \ PHP.
3. Modify the Apache configuration file httpd. conf and add the following: CopyCodeThe Code is as follows: # load the PHP main library to avoid DLL hell
LoadFile "C: \ PHP \ php5ts. dll"
# Load the SAPI so that Apache can use PHP
Loadmodule php5_module "C: \ PHP \ php5apache2_2.dll"
# Set the php. ini location so that you don't have to waste time guessing where it is
Phpinidir "C: \ PHP"
# Hook the PHP file extensions, notice that addtype is not used, since that's just stupid
Addhandler application/X-httpd-PHP. php
Addhandler application/X-httpd-PHP-source. PHPs

4. if an error occurs, copy the DLL in the PHP Directory to the c: \ windows \ system32 directory.

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.