Manually installing the WAMP environment

Source: Internet
Author: User
Tags php mysql php mysql extension
The original answer was published in 2014/04/30 by user256743 in 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, it is recommended to download and use the 64-bit software as much as possible.

Of course you can download the version of the software you want, you can also install the software into your desired directory but for convenience, it is recommended to follow the tutorial completely

Reference

    • Http://httpd.apache.org/docs/current/platform/windows.html
    • http://www.php.net/manual/en/install.windows.apache2.php

Get ready

    1. Download Apache
    2. Download PHP
    3. Download MySQL
    4. [Optional] Download VS2012

Installation

Installing Apache

Unzip the Apache to C packing directory, after extracting the directory should be like this: C:\Apache24\bin

Open cmd, run

CD C:\Apache24\binhttpd.exe "

If the error is not correct, the installation is normal

If the MSVCR110.dll is not found, you need to install VS2012

If the report cannot be bound to 80 port, check if there are other programs that occupy 80 ports, close the

If reported Could not reliably determine the ...:

    • Open C:\Apache2\conf\httpd.conf
    • Find ServerName this line, replaced by:

      ServerName localhost

Make sure the firewall does not block Apache

Open http://localhost, if you see the It works word that says run successfully

If you want to boot up Apache automatically, run httpd.exe-k install. You can then control the Apache2.4 in the Windows service to start it automatically

Install PHP

In the C packing directory to create a new folder php/, unzip the PHP package into this folder after the completion of 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" line and uncomment (remove the;) before the line

Configure Apache to use PHP

Open C:\Apache24\conf\httpd.conf

Under all LoadModule those lines, add the following:

LoadModule php5_module c:/php/php5apache2_4.dll
 
  
   
      directoryindex index.html index.php    AddHandler application/x-httpd-php. php    phpinidir "c:/php"
 
  

Enter C:\Apache24\bin, run Httpd.exe, if no error occurs, the configuration is normal

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

 
  

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

[optional] enable PHP MYSQL extension

Open C:\PHP\php.ini

Find Php_mysqli or Php_pdo_mysql, uncomment

Now you can use MYSQLI or PDO to operate the MySQL database.

Install MySQL

Double-click the downloaded MySQL file

Select Developer Default

The installation will let you configure the root password

After installation, you can right-click on the MySQL Notifier icon in the bottom right corner and disable it from booting

Done

You are now configured to complete 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.