LAMP without the L (WAMP?)

Get ready for some Linux-Apache-MySQL-PHP (LAMP), though I’ll skip the L part for now.

1 - Apache

Get Apache from here. More specifically for Windows, get this file (Apache HTTP Server 2.0.55).

Save the .msi file and when that’s done, double-click the file. The installation is straightforward.

Remember to select “localhost” for your Network Domain and the Server Name, in the Server Information page.

I run Apache as a service, but you don’t have to. It seems more convenient though.

2 - MySQL

I got MySQL 5.0 from here. Since I’m on Windows, I got this particular file (MySQL 5.0.18).

Unzip the file and run “setup.exe”. Pick “Custom” from the Setup Type page. Then you can skip the MYSQL.com Sign-Up page.

When asked if you want to configure MySQL, say yes (check the option) and in the next screen or so, select “Standard Configuration”.

Install as a Windows service, probably easier.

Pick a root password and write it somewhere, just in case.

After MySQL is installed, try and run MySQL Command Line Client from the Windows menus. If you see a console with the the mysql> prompt, you’re all good.

3 - PHP

Download the latest PHP build, 5.1.2, from here. For Windows, get the installer from here.

Unzip the file and run the installer. Everything should be fairly self-explanatory. In the Server Type dialog page, remember to select “Apache” as the HTTP server for PHP to run against.

Keep going until the very end. You will get an Apache Configuration error. It’s okay, just press “OK” and you should get the “Installation complete” dialog. Press “OK” again and you’re…almost done (got to fix that error you just got)

Stop Apache then go to the directory where you installed Apache and open the conf. Edit http.conf and add the following lines to the bottom of the file:


ScriptAlias /php/ "c:/where/you/installed/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php-cgi.exe"

Restart Apache and go to http://localhost:8080/ (change the port number if you had selected to run Apache from a different port)

You should see the Apache welcome page. If so, you’re really almost there.

Add a new file called phpinfo.php (for example) and add this one line to it:
<?PHP phpinfo(); ?>

Save the file and load it from http://localhost:8080/phpinfo.php (again, fix the port number if necessary).

You should see a information page about your PHP setup. Congratulations, you’re PHP enabled!!

I still need to write something up on how to use MySQL from a PHP application, but for now, go here, and start doing PHP stuff.

1 Comment »

  1. Julio Santos » Blog Archive » WAMP Revisited + Wikipedia said,

    March 30, 2006 @ 8:05 am

    [...] A while back I started putting together a tutorial for installing what I called WAMP, or LAMP (Linux-Apache-MySQL-PHP) with the L part replaced with a W for Windows. [...]

RSS feed for comments on this post · TrackBack URI

Leave a Comment