Manually install the WAMP environment

Source: Internet
Author: User
Tags php mysql php mysql extension
Manually install WAMP environment original answer on published by user256743 on http://superuser.com/questions/748117/how-to-manually-install-apache-php-and-mysql-on-windows

Environment

My system is Win7 32-bit

If your system is 64, we recommend that you download and use the 64-bit software whenever possible.

Of course, you can download the software you want, or install the software in the desired directory. However, for convenience, we recommend that you follow the tutorial.

Reference
  • Http://httpd.apache.org/docs/current/platform/windows.html
  • Http://www.php.net/manual/en/install.windows.apache2.php
Preparation
  1. Download Apache
  2. Download PHP
  3. Download MySQL
  4. [Optional] download VS2012
Install and install Apache

Decompress Apache to the C root directory. after decompression, the directory should be like this: C: \ Apache24 \ bin

Open cmd and run

cd C:\Apache24\binhttpd.exe``

If no error is reported, the installation is normal.

If MSVCR110.dll cannot be found, install VS2012

If Port 80 cannot be bound, check whether other programs Occupy port 80. disable

If cocould not reliably determine ...:

  • Open C: \ Apache2 \ conf \ httpd. conf
  • Find the ServerName line and replace it:

    ServerName localhost

Make sure that the firewall does not shield Apache

Open http: // localhost. if you see the words It Works, the operation is successful.

If you want to automatically start Apache at startup, run httpd.exe-k install. then, you can control Apache2.4 in the windows service to enable it to automatically start

Install PHP

Create a folder PHP/in the root directory of the C drive, decompress the PHP compressed package to this folder, and the path looks like this: C: \ PHP \ ext

In the C: \ PHP Directory, rename php. ini-production or php. ini-development to php. ini.

Open php. ini, find extension_dir = "ext", and uncomment (remove the line before the line ;)

Configure Apache to use PHP

Open C: \ Apache24 \ conf \ httpd. conf

Add the following content to the rows of all loadmodules:

LoadModule php5_module C:/PHP/php5apache2_4.dll
 
      DirectoryIndex index.html index.php    AddHandler application/x-httpd-php .php    PHPIniDir "C:/PHP"
 

Go to C: \ Apache24 \ bin and run httpd.exe. If no error is generated, the configuration is normal.

Under C: \ Apache24 \ htdocs \, create a phpinfo. php file with the following content:

 

Open http: // localhost/phpinfo. php. if you see an output similar to the following, PHP resolution is normal:

[Optional] enable PHP MySql extension

Open C: \ PHP \ php. ini

Locate php_mysqli or php_pdo_mysql and cancel the annotation.

Now, you can use mysqli or PDO to operate MySQL databases.

Install MySQL

Double-click the MySQL file downloaded

Select Developer default

During installation, you will be asked to configure the root password

After installation, right-click the MySQL Notifier icon in the lower right corner to disable auto-start

DONE

You have configured the entire WAMP environment.

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.