PHP + Apache Installation configuration

Source: Internet
Author: User
Reproduced in: Click to open the link

php5.5 do a lot of updates, when paired with Apache how to choose also very fastidious, here we take 64-bit php5.6 and Apache2.4 as an example of how to configure.

Tools/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

      Recommended V11 x64, which is 64bit.

    2. 2

      apache2.4, download link: Click to open link

      It is also recommended for v11,64 bit.

    3. 3

      The previously mentioned V11 is a component of Microsoft, if not installed will prompt Msvcr110.dll lost.

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

      Please download the 64bit.

    4. 4

      According to the boot installation V11, here is very simple, and finally need to reboot

      END

2 php5.5.6 Configuration

    1. 1

      Unzip the downloaded PHP, in the D Disk new folder PHP, the extracted files are all copied to d:\php\.

    2. 2

      Add;D to the System environment variable path: \php;d:\php\ext, after reboot takes effect

      END

3 Apache2.4 Configuration

    1. 1

      Unzip the downloaded Apache archive and copy it to d:\Apache24\.

    2. 2

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

      Change the ServerRoot line to ServerRoot "D:\Apache24", where your Apache is placed between the double quotes

    3. 3

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

      Modify the DocumentRoot as follows:

      DocumentRoot "D:/apache24/htdocs"

      Modify the Listen port to: Listen 8080

    4. 4

      Add the following lines to increase support for 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 the httpd.conf and restart the Apache service.

      Tips: d:\apache24\bin\httpd.exe-k Install, this sentence can add Apache to the system services.

      END

4 Harvest the fruit of the victory

    1. Open 127.0.0.1:8080 in the browser, is not able to see it works, this shows that your Apache has been working.

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

      Open 127.0.0.1:8080 in the browser, do not see the relevant content of phpinfo, congratulations, your PHP has been working with Apache!

      END

Precautions

    • Don't forget to install V11

    • Please note your PHP and Apache paths, and be careful to modify the contents of the httpd.conf.

    • php5.5, only with the 2.4 version of Apache, if you are using the mainstream version 2.2 or other, please upgrade to 2.4 version

The above describes the PHP + Apache installation configuration, including the aspects of the content, I hope the PHP tutorial interested in a friend helpful.

  • 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.