Php + apache installation configuration

Source: Internet
Author: User
: This article mainly introduces the installation and configuration of php + apache. if you are interested in the PHP Tutorial, refer to it. Reprinted on: click to open the link

Php5.5 has made a lot of updates, and it is very important to choose how to use it with apache. Here we take 64-bit php5.6 and Apache2.4 as examples to introduce how to configure it.

Tools/raw materials

  • Win7/8 64-bit

  • Php5.5.6 6-bit

  • Apache2.4 64-bit

1. system environment and software

  1. 1

    Php5.5.6 download link: Click to open the link

    We recommend V11 x64, that is, 64bit.

  2. 2

    Apache2.4, Download link: click to open the link

    V11 and 64-bit are also recommended.

  3. 3

    V11 is a component of Microsoft. if it is not installed, msvcr110.dll is lost.

    Download link: http://www.microsoft.com/zh-CN/download/details.aspx? Id = 30679

    Download 64bit.

  4. 4

    Install V11 according to the boot Guide. it's very easy here. you need to restart it once.

    END

2 php5.5.6 configuration

  1. 1

    Decompress the downloaded php file, create a new php folder on drive d, and copy all the extracted files to d: \ php \.

  2. 2

    Add; D: \ php \ ext to the system environment variable PATH, which takes effect after restart

    END

3 Apache2.4 configuration

  1. 1

    Decompress the downloaded Apache package and copy it to d: \ Apache24 \.

  2. 2

    Modify D: \ Apache24 \ conf \ httpd. conf.

    Change the ServerRoot line to ServerRoot "D: \ Apache24". the double quotation marks are the location where your apache is placed.

  3. 3

    Modify D: \ Apache24 \ conf \ httpd. conf.

    Modify DocumentRoot according to the following content:

    DocumentRoot "d:/Apache24/htdocs"

    Modify the Listen Port to: Listen 8080.

  4. 4

    Add the following lines to support php5:

    # Php5 support

    LoadModule php5_module D:/php/php5apache2_4.dll

    AddType application/x-httpd-php. php. html. htm

    # Configure the path to php. ini

    PHPIniDir "D:/php"

  5. 5

    Save httpd. conf and restart the Apache service.

    Tips: d: \ apache24 \ bin \ httpd.exe-k install. you can add apache to the system service.

    END

4. reap the fruits of victory

  1. Open 127.0.0.1: 8080 in the browser. can you see it works? this indicates that your apache has been working.

  2. Modify D: \ Apache24 \ htdocs \ index.html and add , Save.

    Open 127.0.0.1: 8080 in the browser. Have you seen phpinfo? congratulations, your php has been working with apache!

    END

Notes

  • Do not forget to install V11

  • Pay attention to your php and apache paths, and change the content in httpd. conf.

  • Php5.5 can only be used with apache version 2.4 or later. if you are using a mainstream version 2.2 or another version, please upgrade to version 2.4.

The above introduces the php + apache installation and configuration, including the content, hope to be helpful to friends who are interested in the PHP Tutorial.

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.