Use wamp to build a php website running environment(windows)

If we want to debug a php website on local computer, we must build up a php website running environment first, that is PHP + mysql + Apache.
However, for PHP beginners, the establishment of such an environment is very difficult.Fortunately, there are some smart guys have considered to this point, they create tools that make this process more easier.
Now I’ll introduce a tool named “wampserver“, a Windows web development environment,that allows you to create web applications with Apache, PHP and the MySQL database. And it also comes with PHPMyAdmin and SQLiteManager to easily manage your databases.
Wampserver is easy to install and use, it installs automatically (installer), and its usage is very intuitive. You will be able to tune your server without even touching the setting files.
WampServer is the only packaged solution that will allow you to reproduce your production server. Once WampServer is installed, you have the possibility to add as many Apache, MySQL and PHP releases as you want.
WampServer also has a trayicon to manage your server and its settings.

  1. First, download the software from the official site download page of wampserver.The newest version is wampserver2.0, including Apache 2.2.8, MySQL 5.0.51b, and PHP 5.2.6 .
  2. Second, install it.You can find detial information from here.
  3.  Third,when you have installed wampserver, a “www” directory is created (generally c:\wamp\www). Create a directory inside for your project and put your PHP files in it. Click on the link “Localhost” in the WampServer menu or open your browser and open the http://localhost address. 
  4. Fourth,Add Apache, MySQL and PHP releases. 
    WampServer allows you to install almost all the existing releases of Apache, PHP and MySQL so you can reproduce exactly the settings of your production server.
    To add a new release, donwload it here and install it.
  5. Finally, click on the WampServer menu and activate the release that you want to use.

 Wait until the WampServer icon become white again and start to work.

Now, you can put your php scripts into the WWW folder, and use URL such as:http://localhost/test.php
to run it.

Wish you a good luck!

Leave a Reply

You must be logged in to post a comment.