Review: WAMP stacks for Web developers
All-in-one Apache-MySQL-PHP server packages for Windows vary widely in features, flexibility, and ease
There are two places where I do software development for the Web. The first is "out there," on the Web server for which I pay my monthly hosting fee. The second is "in here," right on my own desktop, where I have a stand-alone Web development stack running side by side with everything else.
A stand-alone Web stack is a self-contained way to run the needed components for a Web application without requiring a separate machine or Web account, both of which typically mean extra dollars. Developers can prototype a project locally on such a stack, then deploy the results to a live remote server -- or even convert the local stack into a live server, if they're so inclined and the stack is designed for production use. If you're a novice Web programmer, a local stack is a handy way to learn the ins and outs of programming for the Web in a controlled environment.
Linux users have the advantage of the Web stack being a native part of their environment, since Linux distributions aren't as rigidly partitioned into "desktop" and "server" editions as Windows is -- except in the sense of which components are installed by default. Windows users, though, have to install the entire stack from scratch. The good news is that all the pieces they'd need -- Apache, MySQL, PHP, and so on -- are available in Windows editions.
In this article I review five environments -- AMPPS, BitNami WAMPStack, Microsoft Web Platform Installer, XAMPP, and WampServer -- you can use to set up a local Web development server on a Windows box. These stacks contain all of the above-mentioned components (with IIS and SQL Server Express taking the place of Apache and MySQL in Microsoft's offering) installed from a single executable or .MSI package, so each piece doesn't need to be downloaded, installed, and configured separately. These Web server stacks also contain management tools for each separate component and for the stack as a whole, so you're not stuck with the extra burden of having to manage the whole thing by hand. And they're all free for the downloading.
One thing that's clear from having looked at these stacks: They're definitely not created equal. They may be built from the same components (they would scarcely be useful if they weren't!), but how those components are managed and deployed makes a big difference. Stacks with automatic customization (AMPPS, Web Platform Installer) are far handier, especially when you want to devote more of your attention to working with the stack than actually setting it up.
Second, don't assume these stacks will be production-ready. Some ship in a locked-down state and will only serve connections to the local host, but there's no guarantee the stack as created has been put together to serve live traffic. Other stacks ship with blank MySQL passwords or other major security omissions that need to be addressed, so they're clearly not intended for production use. Develop locally; deploy remotely.
Finally, the differences in deployment styles between each of these stacks means there's a stack for just about every need, application type, or work habit. PHP-heads can run WampServer for the sake of the integrated debugging tools. Microsofties have Web Platform Installer and WebMatrix. The choices are yours.
While assembling this article I found a number of other stand-alone stacks worthy of mention, even if they didn't make it into the final article. Uniform Server contains a stack similar to XAMPP or WampServer (especially in terms of the tray-based control panel) and comes packaged in a "miniServer" edition for enhanced portability and security. Server2Go was originally built to allow a working PHP website to be distributed on media like a CD-ROM or USB drive, but can be used for stand-alone development as well. And EasyPHP has the PHP debugging functions of WampServer and a small collection of add-on application packages à la Web Platform Installer and AMPPS.
AMPPS 1.7 AMPPS provides not only a Web development stack but also a framework, Softaculous, for deploying popular applications already written for that stack. Those of you with your own Web hosting accounts might already be familiar with Softaculous. I was, as I'd used it to deploy WordPress and a few other packages on my website. This makes AMPPS hugely convenient if you want to deploy a site that makes use of existing software, without having to install and upgrade those bits yourself.
Setting up the core of AMPPS is simple enough: Run the installer, and launch the system-tray app that lets you access AMPPS's innards. Go to the AMPPS Web interface, and you can pick from dozens of packages to install. The list of applications is gigantic. It's safe to say most any third-party Web app that you might use -- WordPress, Joomla, Drupal, MediaWiki, ccMail, Zen Cart -- can be installed via the AMPPS interface. It's also possible to add custom applications if you're developing one and want to test its deployment. An FTP server is included in AMPPS by default, so you don't have to add that.
Note that in order to install packages on AMPPS, you need to have a live Internet connection on the system in question. This is usually not a security issue if you've already set up firewalls and such. Also note that the default domain for an AMPPS installation is 127.0.0.1. If you want apps to install correctly in the stack so that they're accessible by other machines, you'll need to manually add the AMPPS machine's IP address as a domain and select that IP address in the Domain dropdown that's provided when setting up a software package.
Installing applications in AMPPS via Softaculous is almost entirely automated and almost entirely stress-free. The default settings work if you're in a hurry, but you don't need to configure much by hand in any case, save for the installation directory. If your server can talk to a mail exchanger, you can have a complete report for each app installation emailed to you.
Demo versions of each app are included, but they're not actually run from your installation of AMPPS. They're hosted on the Softaculous site, so again you need a live Internet connection to make use of them.
Documentation for AMPPS is a little thin, and it only covers setup and a few other minor bits. Most of the relevant documentation is on the Softaculous site, although this is not made very clear when reading AMPPS's docs. Granted, the elements in the stack all have their own separate documentation; experienced users know where to go to learn about Apache's httpd.conf and the like. But it would still be nice to have all documentation in one place.
Recommended for: Those who want to develop with multiple apps.
AMPPS uses the Softaculous framework to ease adding and removing apps from the stack.
BitNami WAMPStack 5.3.10 BitNami publishes a bevy of prepackaged environments for popular Web applications. Its approach stands in stark contrast to that of AMPPS. With AMPPS, you set up a single framework that allowed you to add or remove Web apps as needed. But with BitNami, each Web app is a stand-alone product packaged with a separate copy of the stack. BitNami is best for people who know exactly which app they want to work with and no other, free of distractions or superfluities.
WAMPStack, for instance, is a BitNami stack that contains nothing but the stack itself: Apache, PHP, MySQL, and that's it. PostgreSQL (5.3.10-2) is available as an add-on, but if you want to include anything else, you have to do it manually. Note that a variant, WAPPStack, uses PostgreSQL as the default database; if you'd rather use PostgreSQL, you can opt for that instead as everything else is identical.
Actually, the *AMP stack installed with WAMPStack isn't absolutely minimal. At install time, you're given the option of setting up several other components: Zend Framework, Symfony, CodeIgniter, and CakePHP. You also choose which phpMyAdmin password to use during setup. Note that phpMyAdmin is by default locked down from the outside. You can access it only from the local machine and not a remote host.
The WAMPStack management tool is minimal, to put it kindly. It consists of little more than an interface from which you can stop and restart the MySQL and Apache servers. There are no management tools, no links to configuration files or log files, no port-check functions. Perhaps the assumption is that BitNami's users are by default expert enough that they won't need the hand-holding. Even so, it would still be nice to have quick access to the most commonly used stuff.
As an aside, many stacks in the BitNami library are also available as virtual machines. WAMPStack itself isn't, in big part because all of its components are standard-issue items in any vanilla Linux distribution. But other stacks that include preloaded apps, like BitNami's WordPress stack, come as VMware images. Others are also available as Amazon AWS machine images, if you want to jump right to hosting your stack in the cloud -- which is a big part of what BitNami offers as one of its for-pay services.
Recommended for: Those who want to develop with a specific application platform.
"Minimal" is the best word for BitNami's control panel for the WAMPStack.
Microsoft Web Platform Installer 3.0 Microsoft's Web Platform Installer provides a user with an automated way to create a Web software stack on top of Internet Information Server. Right there, it's at odds with everything else described here in that Apache is not part of the picture -- but almost everything else in the *AMP stack (PHP, Perl, MySQL) is. Still, it would be a bit of an omission not to talk about it, especially since it helps accelerate Web development on Windows platforms by deploying many non-Microsoft stack elements.
Of all the other stacks listed here, Web Platform Installer (WPI) comes closest to the Softaculous AMPPS stack, in that it allows you to deploy and manage numerous third-party and open source components on top of IIS. It's also similar to Softaculous in that all the components of the stack are managed through an interface (here, it's a native Windows app), and they're downloaded on-demand and installed as needed.
When you first run WPI, you can set things up roughly one of two ways. The "easy" way is to select Applications, pick the app(s) you want installed, and let the installer do all the heavy lifting. Any components needed for the installation that are not already installed will be auto-selected and installed. The installer also asks pertinent questions about the app(s) you're setting up: default usernames and passwords, database connections, and so on. It's all very professionally presented and deployed.
The slickest part of the Web Platform Installer isn't the Installer itself, though that's nice on its own. It's the WebMatrix control panel application, which provides a management interface for websites deployed through WPI. From this interface you can perform basic administration on the website (start/stop/restart), jump to the Web-based configuration pages for any installed applications, see a log of all requests fulfilled by the site (with a handy search function), examine databases and files associated with the site, and even run SEO/performance reports on a given site.
Another of WPI's big strengths is that it works as a staging server, from which content can be automatically deployed to a production site with a couple of clicks. This includes everything: the files on the server, data in the database, everything. Unfortunately it doesn't let you do the same in reverse; you can't slurp up a remotely published site and edit it locally unless that site was deployed from WPI in the first place.
Another issue I ran into: When an app is deployed in WPI, it's deployed in a stack that has its own port number. If you want to change this port number, you'll need to change it by hand in WebMatrix and the app's own internal settings. Also, the default hostname for the app is localhost, so if you want to make the app accessible by anything other than the local system you'll need to change the hostname (again, in both WebMatrix and the app itself), and open a port in the system's firewall for good measure.
Recommended for: Those developing on IIS on Windows Server, but using open source stack components as well.
Microsoft's Web Platform Installer lets you pick applications and even whole frameworks, by Microsoft and others too, to install into your stack.
WampServer 2.2 A stack similar to XAMPP in construction, but with fewer components in the stack, is WampServer from AlterWay. This stack seems to be aimed most directly at the PHP programmer, since it ships with a set of PHP debugging and tracing tools. Debugging has long been one of PHP's Achilles' heels, so it's handy to have a stack shipped with components that address that issue.
In addition to the usual *AMP stack components -- Apache, PHP, and MySQL -- WampServer includes only maintenance (phpMyAdmin, SQLBuddy) and debugging (XDebug) functions. Perl isn't included. In fact, the WampServer curators don't provide any other components that can be added to the stack. They allow you to add on earlier versions of various stack elements, though. You can, for instance, install older versions back to PHP 4.1.2, or earlier versions of Apache or MySQL. (None of this precludes manually grafting something into the stack, of course.)
Once installed and run, WampServer works in much the same way as XAMPP. It places an icon into the system tray, from which you can start or stop the various services in the stack, jump quickly to key directories (such as the directory that holds the root of the Web server), or open configuration files or logs.
The tray controller also provides quick access to service-specific settings that would otherwise require a lot of poking around under the hood. With Apache, for instance, there's a selectable list of which Apache modules to load and an editable list of alias directories. Changes made to these lists are reflected in httpd.conf, but if you edit httpd.conf directly to make changes, those changes don't show up in the tray controller's list until you restart the whole of WampServer. This doesn't make editing configurations through the tray controller any less handy, but you need to be aware of how changes are kept in synchrony between the tray app and the stack's actual configuration. In short, make configuration changes either in WampServer or in the stack's config files, but not in both at once.
One of the handier options in the tray icon, Put Online/Offline, lets you quickly disable access to the Web stack (the "offline" mode) from anything except the local host. To that end, as a security measure, the admin tools (such as phpMyAdmin) are only available locally by default. On the other hand, the default MySQL password is blank -- a really bad idea.
While most stacks include phpMyAdmin for managing MySQL, WampServer also packages SQL Buddy, a minimal but still immensely functional administrative front end for MySQL. (Be warned that SQL Buddy has some cross-site scripting vulnerabilities in the 1.3.3 edition.) For PHP debugging, there's XDebug, WebGrind, and XDC; note that WebGrind is configured to run only locally for security's sake.
The documentation for WampServer is minimal at best. There's no installation walkthrough, save for what you get when you run the installer itself. There isn't even a good explanation of the various functions available through the tray control app. I had to figure out on my own what the "online/offline" function was for. I also ran into port-conflict issues, but there is at least a test function within the tray app to let you know if port 80 is already in use. It's not nearly as detailed as the port-assignment tool in XAMPP, but it does at least help you figure out what might be blocking vital ports.
Recommended for: Those doing PHP programming, especially if you need PHP debugging tools as part of the stack.
WampServer's control panel provides quick links to configuring many of the components in the stack.
XAMPP 1.7.7 (1.8 beta) XAMPP, from Apache Friends, is one of the best-known and consistently maintained development stacks out there, available not only for Windows but for Mac OS X, Linux, and Solaris. It includes Apache, MySQL, PHP, Perl, and a few other bits of plumbing such as an FTP server and a mail agent, should you need them.
XAMPP comes in two basic incarnations: with and without an installer. The "installed" version sets up XAMPP as if it were an application, with the program icon launching XAMPP's system-tray control panel app. The installer-free version is just an archive that you can unpack anywhere, but which needs to be configured manually by way of a batch file. You can actually skip the configuration step if you've unpacked the whole of XAMPP into the root directory of a device (for example, a USB flash drive).
Certain components of XAMPP -- Apache, MySQL, and the FileZilla FTP server -- can be run either as a standard Windows application in the background or as a system service. The former is useful if you want XAMPP to run with a minimal system footprint and if you hate having unneeded system services hanging around in the background even when they're not being used. XAMPP's version of Apache also comes preconfigured with SSL, which is handy if you want to test apps that need it.
XAMPP's system-tray launcher lets you control the activation of each major component of the stack, and install or remove Windows-service versions of each stack component where available. It also provides you with quick access to the management consoles (Web-based or otherwise) for each component, and a minimal event log for the whole stack.
One problem I immediately ran into: When you launch XAMPP, you aren't warned if any of the running services conflict with existing port assignments. My copy of Skype used port 80, which resulted in Apache refusing to start -- I had to debug it manually.
To fix this and many other problems, a new iteration of XAMPP's launcher is in the works. It's still a beta product, but a copy of the beta edition is supplied with the current version of XAMPP, so you can use it interchangeably with the original launcher. The beta warns you about port conflicts and provides you with quick links to the log files for each component. It can also launch an instance of the Netstat tool to see which programs are using which network ports on the local machine.
XAMPP's second main drawback is that it doesn't have a culture of add-ons to expand its functionality. What you see is all you get. What few add-ons were created for it (Tomcat, Perl) have since been rolled into the main package. Those interested in any languages not supported directly in XAMPP (Ruby, for instance) are probably better off with another stack that has a richer collection of products. There's also no direct integration with any development environments, so you're entirely responsible for your own code maintenance.
For those of you who use the PortableApps collection of programs, there's a version of XAMPP packaged for PortableApps. It omits some of the packages found in the original distribution for the sake of a smaller installation, but it's got all the most crucial pieces.
Recommended for: Beginners and those who want a "server on a stick" setup.
The new beta version of the XAMPP control panel includes port checking and a more detailed interface than its predecessor.
This article, "Review: WAMP stacks for Web developers," originally appeared at InfoWorld.com. Follow the latest news in programming at InfoWorld.com. For the latest business technology news, follow InfoWorld.com on Twitter.
Read more about application development in InfoWorld's Application Development Channel.