2009. november 23., hétfő

Installing WAMPServer step-by-step

Intended audience

People familiar with basics of HTML, basics about how the web works (what a web server is, what a browser is), basics about installing programs on Windows XP, some idea about programming in general (10 PRINT "HELLO WORLD").

Goals

Get an environment up and running, so that you can start experimenting with webpages containing PHP code (dynamic webpages) and webpages storing and retrieving data to/from a database.

Step 1 : Downloading WAMPServer

You can get WAMPServer from here: http://www.wampserver.com/en/download.php

I chose WAMPServer, so that we can get the Apache webserver, MySQL database and the PHP programming language all in one package, with less need to configure.

Step 2: Install and configure WAMPServer

WAMPServer comes in a handy install package. Double click and install (hit next a couple of times).

If you have FireFox installed (and you should!) WampServer will ask if you want to make it the default browser to use with WAMPServer. Be nice to yourself and answer yes.

Windows XP will warn you about blocking the apache server. You will need to click on Unblock, if you have the firewall on. Apache server will need to run on TCP port 80 of your PC.

Setup SMTP server for PHP's mail() function. When you write code that needs to send an e-mail (for example registration confirmation), PHP will need to know about an SMTP server to use. If you don't know what to enter, you can safely use the defaults, we can change them later on.

On the next screen, click to launch a WAMP servers (leave checkbox on).

WAMPServer should be up and running.

Step 3: Peeking at WAMPServer

Once running, WAMPServer has a little tray icon in the bottom right corner of your screen. By clicking it, you will be able to access everything you need to get started real quickly:

Clicking the first item Localhost will open a web browser displaying the root page of your web server. On this page (until you replace it with your own :) ) you will find the apache web server version, the PHP version, loaded PHP extensions (don't worry about these for now) and your MySQL version (remember: Apache is the server that displays your web pages, MySQL is a database engine, that can store your data, PHP is the programming framework and language you can use to link your web pages to your database, and much more).

You also have access from here to phpinfo() which gives a very detailed information about your PHP settings, and phpmyadmin which will allow you to check on data in your database and do housekeeping tasks (like creating databases, creating and modifying tables).

Okey, back to your pop-up menu in the tray (little wamp icon).
Menu item #2 will open phpmyadmin in the browser window, from here, you will be able to manage your data.

3rd menu item: www directory very important place, this is where you have to put your HTML or PHP files to work. You copy them here, and you can view them in the browser by using the 1st menu (Localhost).

The following 3 menu items allow you to configure, check the configuration and view log files for apache, PHP and MySQL. You can also access the MySQL console from here, which you don't need for nornal operation, since you have phpmyadmin, and it is so much easier to use.

From the quick admin section, you can start and stop the severs (actually you have two of them, Apache, and MySQL, PHP is a modules inside Apache, as far as we are concerned right now).

It is as simple as that!

If something is missing, or unclear, let me know.

Next post will contain details about how to create your first PHP project.

Nincsenek megjegyzések: