Php-wamp Integration Pack Installation Tutorial

Source: Internet
Author: User
Tags php server

Build PHP's development environment on the Windows platform to download the Wamp (Windows, Apache, MySQL, PHP initials) integrated installation package. This makes it unnecessary to install Apache, MySQL, and PHP separately.

This software in the process of installation has been Apache, MySQL, PHP inherited good, but also do the corresponding configuration, in addition to Sqlitemanager and phpMyAdmin, save a lot of complex configuration process, So that we can put more time on the development of the program. It is even more gratifying that this software is also completely free, you can login http://www.wampserver.com/en/download.

Important: Basically every step to change the configuration file after the end of the operation after restarting the corresponding service will not take effect, that is, if you want to modify the immediate effect, you must save after the changes to restart the corresponding service!

First, install the Wampserver

The following error may occur during the installation process:

Workaround: Access address http://www.microsoft.com/zh-cn/download/confirmation.aspx?id=30679 download and install the corresponding version (I am here 64 bit)


Then start the formal installation of Wampserver! The installation steps are simple.






Here is the selection of the default browsing tool: The installation process will be prompted to choose the default Browsing tool, but note that this browsing tool is not the browser, it refers to the Windows browser, which is Explorer.exe, the default is this, directly click "Open" on it.

, you will be prompted to enter the administrator mailbox and the Mailbox SMTP Server window, this if you are willing to fill in, you can fill it, but under normal circumstances directly click on the next can be, will not affect the installation.

Ok! This installation is successful! A marker will appear at the bottom right corner of the screen. The default is English, right-click to modify the language.

Left-click, and then click "www directory" will open the installation wampserver default home Page folder, but many times, we store the page folder is not in that directory, how to get rid of this directory? Of course there is a way to open the Wampserver installation directory, open the inside of the "script" folder, with Notepad open the inside of the config.inc.php, found "$wwwDir = $c _installdir." /www '; ", change to the directory you want to do, such as change to D:\website, the corresponding code is $wwwdir= ' D:/website '; (note that the" \ "under windows that represents the path must be changed to"/"here). Then turn the wampserver off and then on, and the WWW directory becomes the D:\website we set. (Note: Here is only a link on the Wampserver, the real Apache directory is not here, change the way please do not worry, continue to look down.) )

Then, "Switch to online status" and "Start all services", click "Localhost". Under normal circumstances, the following page appears:

Ii. configuration of MySQL and phpMyAdmin

A separate installation of MySQL friends will certainly find a problem, the previous installation of MySQL is required to configure a root password, but when the installation of Wampserver, there is no password to configure the steps, it is not the password MySQL is empty? The answer is yes, it is indeed a blank password. Wouldn't it be very unsafe? Very right, so we have to change the password.

Left click, select "PhpMyAdmin", will open the PhpMyAdmin Management page, click on the "user" above, the general situation will appear in the table, we have to do is click on each line of the user named Root to the right of the "Edit Permissions", and then modify the password.
If 1:30 will not think of a good password, you can also use the "Generate password" function to generate a random password, but this password must be remembered, forget the trouble can be big.



After doing this, restart the MySQL service, and then refresh the page, and everyone will find the error, which is why? Because we have just modified the MySQL password, but did not modify the phpMyAdmin and MySQL communication password, how to change it? Open the Wampserver installation directory, open the \wamp\apps\phpmyadmin4.1.14 in turn, and open the config.inc.php inside with Notepad to find "$cfg [' Servers '] [$i] [' password '] = ";", enter the password you just modified, and then save, after the operation is finished and then refresh the phpMyAdmin page, it is back to normal.

After finishing the above configuration, we need to create a database for the MySQL database and the user, the same, click on the user button above, find the "Add new User" link, follow the way shown to create a user and corresponding database, and give a single database management rights, The following resource restrictions are completed according to the actual situation can be, the general use of the case that the area can be left to the default, and finally click on the bottom right corner of the "Execute" button, the corresponding user and database is created.

There is another way to modify the password of the database root user: Modify the MySQL password on the cmd command line
CD C:\wamp\bin\mysql\mysql5.6.17\bin

Mysql-u root-p
Use MySQL
Update user set Password=password (' HNCCTV ') where user= ' root ';
Flush privileges;

MySQL Graphical management tool: Navicat and so on.

III. Configuration of Apache

Although Wampserver has helped us to integrate the Apache, but some of the details of things still need our own to improve, let us have a pair of wampserver to complete the Apache.

1, just loaded after wampserver, there is no temper more anxious friends may try to access our configured Wampserver server through the external network, but will find through the external network access will prompt insufficient authority, this is why? is because Wampserver by default is only allowed 127.0.0.1 access, that is, only allow native access, how to modify it? Click -apache-httpd.conf to find the place:

2, I believe you remember the above change wampserver "www directory" point to the path of the way it? I once said that this method only changed the Wamp "www directory" this link, then if you want to really change, how should we change it? Very simple, open httpd.conf, look for "documentroot", change the value of the back to our actual site needs of the path, and then look for "<directory" c:/wamp/www/">", also change the value of the back to our site to store the actual address , it's OK.

Iv. Configuration of PHP

PHP configuration is relatively simple, only need to make some basic settings to modify it, click-php-php.ini, find these three places:
Short_open_tag = OFF (Is it allowed to use the abbreviated form of the PHP code start flag (<??>). );
Memory_limit = 128M (maximum size of memory used);
Upload_max_filesize = 2M (maximum number of uploaded attachments)
The first need to change to on, otherwise a lot of PHP programs will not work, the latter two will be in accordance with the actual needs of everyone to change the line.

Five, 80 port conflicts

If IIS is installed on the machine, it will cause a 80 port conflict because IIS defaults to 80 ports. The solution is: Click -apache-httpd.conf, find the place, change 80 to 81, then restart all services.

Vi. Summary

To this end, our wampserver configuration can be temporarily completed, of course, wampserver and its add-ons function operation is far more than simple, the purpose of this article is only to allow you to use the Wampserver to build a PHP server environment, Then you need to figure it out for yourself.

Php-wamp Integration Pack Installation Tutorial

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.