Google
 

Saturday, December 1st, 2007

Now a day you can’t get any notice with just a simple HTML page. Everything is run with dynamic content. Companies are paying top dollar for people who can program PHP and ASP. I’m going to show you how to build a server with PHP and MySQL in less than 10 minutes. If you say it can’t be done just try me, I did it to write this article!

In my last article which can be found here I showed you how to build an apache web server for windows. Now this article is going to go in to more depth. That server would only serve up HTML pages. This server will be able to run programs such as this BLOG program. You should have no problems running anything in PHP!

Let’s start with the server configurations. You’re going to be running PHP which is an intensive web language. It wouldn’t take much to run just PHP but you have to factor in the fact that you’re going to be running a MySQL database as well. My recommendation is to have a computer that is at least a Pentium 4, running XP and hopefully have 512MB of RAM. If you plan to have a lot of traffic coming to your site then you may want to just give up on following this article and pay for hosting. But if not here we go, let’s get started.

The program I found is really easy to use; it’s called a WAMP server. Now this name is a play off of the ever popular LAMP server. Lamp stands for Linux, Apache, MySQL and PHP; you can guess what WAMP stands for based on that. This awesome server can be found for download at http://www.wampserver.com/en/download.php. Let’s Run through the Installation first and then I’ll go in to detail about the administration.

Step 1: The installation is very simple just open the wizard and follow the instructions from there.

WAMP Screenshot 1

Step 2: The only weird part of the installation is towards the end when it asks you what browser you use (see the screen shot below). Seeing as how this is my test machine all I had was Internet Explorer so you will need to find the .exe file for your browser. If you are running windows and use Internet Explorer the file is located in c:/Program Files/Internet Explorer. It is named Iexplore.exe.

WAMP Screenshot 2

There you go you’re all installed! Now why is this program so great? Not only does it make it easy to create a WAMP server, it makes it practically a no brainer to administer it. You can start, stop and restart all the services right from the little icon in your tool bar. The first thing you want to do is click this icon and choose “Put Online”, this starts all the services. To test it you can click the localhost button in the menu or open your browser and surf to localhost. You’ll see that the home page looks a little different than it normally would. This PHP page shows you all the installed modules and the status of all the servers. Now that we’ve tested everything let’s take a look at all the administration tools beginning with apache

WAMP Screenshot 3 WAMP Screenshot 4

 

Apache:

  • · WAMP allows you to switch versions of apache easily. The good thing about this is that WAMP will tell you if the version of apache is compatible with your version of PHP and MySQL. The base server only comes with version 2.2.6 but if you click on the “Get more” button you can download newer or older versions.

WAMP Screenshot 5

  • · WAMP allows you to easily add an alias to apache. Just click the “add alias” button in the server and it brings up a prompt that will guide you through adding one.

WAMP Screenshot 6

  • · It allows you to easily add and remove apache modules. This can be a very tedious task without this program, involving editing lines of code and finding the right versions of all the modules.

WAMP Screenshot 7

  • · It also gives you easy access to the conf file. Just another bright idea.

WAMP Screenshot 8

 

PHP:

  • · WAMP allows you to easily view and edit the php.ini file and easily view the error logs generated by PHP.

WAMP Screenshot 9

  • · WAMP also allows you to add or remove extensions to PHP simply by checking or un-checking them in a list.

WAMP Screenshot 10

  • · WAMP also allows you to change the version of PHP just like apache. WAMP will also warn you if the version you choose in incompatible with the other servers.

WAMP Screenshot 11

MySQL:

  • · WAMP lets you easily change the version just like PHP and Apache, and again it will warn you if the version you choose is not compatible with the other serves.

WAMP Screenshot 12

  • · WAMP allows you to easily stop and restart MySQL as well as installing and removing services.

WAMP Screenshot 13

  • · WAMP allows you to open a console to MySQL right from its menu. It also allows for easy editing of the my.ini file and viewing of the Error Logs.

WAMP Screenshot 14

As if WAMP didn’t do enough already it also automatically installs phpMyAdmin, which is a web-based program that allows easy and visual administration of MySQL. I’ll go over how to work phpMyAdmin in a later article and how to install it if you already have a WAMP or LAMP server.

WAMP Screenshot 15

So all in all this program does in 10 minutes what a network professional could do in almost 3 hours. This program has proved itself over and over with its rich feature set and advanced installation.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google


  3 Responses to “PHP, Apache, MySQL and more on Windows”


> Leave a Reply