WAMP (windows+apache+mysql+php) environment construction

Source: Internet
Author: User
Tags apache download mysql download php download

PHP has been learning for some time, has not written about the development environment Building notes, now fill it up, because the steps to install the configuration is not very clear, draw on some other people's experience, summarized as follows:

First go to the official website to download the various software, download the required version:

Apache Download: http://www.apache.org/dyn/closer.cgi

MySQL Download: http://dev.mysql.com/downloads/

PHP Download: http://cn2.php.net/downloads.php

I chose the latest version because I did not consider a generic version of the environment because I had previously built it:

apache24,mysql5.5,php5.5.9

The installation steps are detailed below:

1. First install the software and install other software, like the installation of the line, preferably in the C packing directory, other directories can also, now assume that the installation path is as follows:

Apache C:\Apache24

PHP C:\php5.5.9

MySQL C:\Program files\mysql\mysql Server 5.5

2. Configure Apache

Open C:\Apache24\conf\httpd.conf, and at the end of the LoadModule list, add:

LoadModule php5_module "C:/php5.5.9/php5apache2_4.dll"
Phpinidir "c:/php5.5.9"

Find DocumentRoot, modify it to DocumentRoot "C:/apache24/htdocs" (your Web server root directory)

Find DirectoryIndex, modify to DirectoryIndex index.html index.php (here is the portal file to set up the website)

2. Configure PHP

In the environment variable path of the system, add: C:\php5.5.9; C:\php5.5.9\ext;

Change the file name of Php.ini-dist under C:\php5.5.9 to PHP.ini, open.

Find Doc_root, modify to Doc_root =c:\apache24\htdocs

Find Extension_dir, change to Extension_dir = "./ext"

Remove the semicolon ";" in front of the following modules: Extension=php_mysql.dll,extension=php_mysqli.dll,extension=php_gd2.dll.

This configures Apache and PHP, and then we can test for the success of the configuration:

In the Web root directory (such as my htdocs), build a file named index.php, which reads as follows:

<?

Phpinfo ();

?>

Restart the Apache service (restart to take effect each time the configuration is modified)

Open http://localhost/index.php with the browser, if you can see the PHP output configuration information can be used.

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.