How to build an Apache PHP environment under Windows

Source: Internet
Author: User
Tags apache php
This article to share the content is about the Windows Apache PHP environment to build the method, a friend in need of reference

Often in the Linux environment to build PHP environment, under windows or the first time, no technical content, is to record, the need for friends refer to the following tutorial

Often in the Linux environment to build PHP environment, under windows or for the first time, no technical content, is to record, save the next time you have to find everywhere.

Download Address

http://windows.php.net/download/#php-5.5
http://www.apachelounge.com/download/
http://www.microsoft.com/zh-CN/download/details.aspx?id=30679

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

After downloading, install V11, unzip Apache and PHP into the directory you want.

Configuration

PHP Configuration

PHP needs to configure environment variables. Put X:\php; X:\php\ext added to PATH.

APACHE Configuration

Modify the X:\Apache24\conf\httpd.conf file.

Needs to be modified:

ServerRoot "X:\Apache24" DocumentRoot "X:/apache24/htdocs" <directory "X:/apache24/htdocs" >listen 8080ServerName localhost:8080

You need to add:

# php5 Supportloadmodule php5_module x:/php/php5apache2_4.dlladdtype application/x-httpd-php. php. html. htm# Configure The path to Php.iniphpinidir "x:/php"

Configure Apache, configure the environment variables, install the V11, and then you may need to restart the computer.

Launch Apache

X:\Apache24\bin\httpd.exe-k Install/start/stop/restart

Verify the Apache server is successful, enter 127.0.0.1:8080 directly in the address bar, if you can open the Web page, the Apache is successful. Verify that PHP is configured successfully, create a new PHP file such as php.php, enter

<?php phpinfo ();?>

In the X:\Apache24\htdocs directory, and then open the 127.0.0.1:8080/php.php with your browser.

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.