NYPHP - PHundamentals

From Zero to AMP with XAMPP

Prepared for GNUbies Presentation, March 10, 2003

XAMPP is a packaging of Apache, MySQL, PHP and other software (phpMyAdmin, etc.) that provides a rapid setup of an AMP development environment for either Windows or Linux. The Windows package is an especially easy way to get started with both learning and development on home systems that run Win98, Win2K or XP.   And nothing is actually "installed" or written in the Windows registry, so it's very clean.

The information that follows highlights this ease of setup.  You'll find the complete installation instructions on the Apache Friends website to be very straightforward.

Windows Install

Installing PHP/MySQL on Windows using XAMPP requires nothing more than mastering the following skills:

If you've got these basic skills, you're ready to go!

  1. Click on this link to download the latest version of XAMPP for Windows.
  2. The EXE (7-zip) is recommended.  It is smaller (almost half the ZIP version) and also self-extracting.
  3. Download it to the C:\ directory, double-click on it and a dialogue box appears.  Click the Extract button.
  4. Everything will be extracted to a created folder called "xampp" under the C:\ directory. (You could, if you like, place it in another subdirectory of your choosing.)
  5. Double-click on the file setup_xampp.bat which is in the subdirectory containing the XAMPP installation. Follow the directions it displays on the screen.

That's it! You're done! It's really that easy!

You can now test your installation by going to a browser and entering the following URL:

http://localhost

You will see something that looks like Figure 1 below.

install image

Advanced Configuration for Windows NT/Windows 2000/Windows XP

The "Apache" and "MySQL" folders created by the XAMPP installation will have batch files for installing Apache
and MySQL as services.  Run these two batch files.  Then create a shortcut in your Windows Startup folder that points to the file "ApacheMonitor.exe" which is located in the \apache\bin subdirectory.  Finally, go to the Windows Control Panel and configure these services - Apache and MySQL - to start manually.  You want to minimize the services that run automatically for security purposes.

The next time you start up your Windows machine, the Apache Monitor will appear in your system tray.  Double-click on it to open it up, click on the button to start up Apache.  Click on the Services button to bring up the Services window to start MySQL.  The ApacheMonitor is handy for when you want to restart Apache after making changes to the php.ini. (See Figure 2 below)
 

A few helpful notes:

Figure 2

example

Linux Install

While compiling your own versions of Apache, PHP and MySQL on a Linux box may be the preferred way for advanced developers, XAMPP for Linux gets you up and running a lot quicker and is the perfect solution for someone who is new to the world of LAMP.

  1. Click on this link to download the latest version of XAMPP for Linux.
  2. Download the compressed tarball to the /opt directory and run the "tar xvzf" command against it.
  3. Everything will be extracted to a created folder called "lampp" under the /opt directory.
  4. Run the shell script "/opt/lampp/lampp start" to get things going. Note the space between the words "lampp" and "start".

A few helpful notes:

You'll find additional information on XAMPP at http://www.apachefriends.org.


Contributors to this note include the following:


Additional Resources

New York PHP

http://www.nyphp.org

New York PHP Mailing Lists and Forums

http://www.nyphp.org/lists
http://www.nyphp.org/forums

New York PHP PHundamentals

http://phundamentals.nyphp.org

Apache Friends

http://apachefriends.org