PHP Learning Note Wamp installation configuration

Source: Internet
Author: User
Tags apache download

First, download Apache, PHP, mariadb

Apache:http://www.apachehaus.com/cgi-bin/download.plx

The VC9 version is divided into 32-bit and 64-bit editions. The computer needs to have visual Studio 2008 installed.

The VC11 version is divided into 32-bit and 64-bit editions. The computer needs to have visual Studio 2012 installed.

php:http://windows.php.net/download#php-7.0

Currently the latest version of PHP is PHP7, my personal download is php5.6

Because php5.6 only vc1132 bit and 64 bit version, so my Apache download is also VC11 version.

mariadb:https://downloads.mariadb.org/

Second, configure Apache

My Apache is compressed and I unzip it on the D:/php/apache24.

Configuration process:

1. Locate the D:\Apache24\conf\httpd.conf file, open it with Notepad,

Found: Define srvroot This item, change the value on the right to

The directory address where you are currently installing Apache, as follows:

Define srvroot "D:/php/apache24"
ServerRoot "${srvroot}"/span>

Found: Listen, this is a modified port, modified to

Listen 80

Found: Doucumentroot This entry, change the value on the right and the following directory to the address of your Web root directory as follows:

DocumentRoot "D:/webroot"
<directory "D:/webroot" >

Add PHP5 support:

# PHP5 Surport
LoadModule Php5_module D:/php/php561/php5apache2_4.dll
AddType application/x-httpd-php. php. html. htm
# Configure the path to PHP.ini
Phpinidir "d:/php/php561"

Default home: Find Directoryidex, add later: index.php index.html login.html

2, configure the virtual site, similar to IIS under the construction of multiple sites. Find the D:\php\Apache24\conf\extra\httpd-vhosts.conf file, open it with Notepad,

Pull to the bottom and see

#<virtualhost *:80>
# ServerAdmin [email protected]
# documentroot "${srvroot}/docs/dummy-host.example.com"
# ServerName Dummy-host.example.com
# Serveralias Www.dummy-host.example.com
# errorlog "Logs/dummy-host.example.com-error.log"
# customlog "Logs/dummy-host.example.com-access.log" common
#</virtualhost>

#<virtualhost *:80>
# ServerAdmin [email protected]
# documentroot "${srvroot}/docs/dummy-host2.example.com"
# ServerName Dummy-host2.example.com
# errorlog "Logs/dummy-host2.example.com-error.log"
# customlog "Logs/dummy-host2.example.com-access.log" common
#</virtualhost>

Noun Explanation:

ServerAdmin: When the website is out of trouble, you can improve your email by following the email.

DocumentRoot: The path to a site in the root directory of the Web site, such as "D:/webroot/ci"

ServerName: Website URL.

Serveralias: The alias of the website.

errorlog, Customlog: Log path.

3. Registering Apache Service

Open the cmd window, enter: "D:\application_software\Apache\bin\httpd.exe"-K install-n Apache

Remember to include quotation marks. The command means installing the Apache service and naming the service name Apache (you can also change to another), enter.

During this process my computer reported me a mistake because my 80 port was occupied.

80 Port View: Netstat-ano. Depending on the PID shown, see in the Task Manager which process is consuming 80 and kill. My 80 is occupied by the system, the workaround is as follows:

Win+r, and then enter Regedit to open the registry. Find Hkey_local_machine\system\currentcontrolset\services\http, click on the HTTP to the right can find "start", double-click Start and then change the value data to 0, save, restart the computer.

4, the last step

In the installation directory, locate the D:\application_software\Apache\bin\ApacheMonitor.exe executable file, double-click Run, the desktop icon appears in the bottom right corner, start on the line.

Ok,apache configuration is done.

Third, PHP configuration:

1. Unzip the downloaded files and put them in a directory on your computer. Like mine: d:/php/php561

2, add;D in the System environment variable path: \php\php561;d:\php\php561\ext, after reboot takes effect

Ok!

PHP Learning Note Wamp installation configuration

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.