Let's be clear about something this book is not about operating system wars. Those of you interested in the great Windows versus UNIX debate can find literally thousands of pages of well-thought-out, informed dialogue among the ever rational and well-spoken denizens of Slashdot (slashdot.org).
It is, however, worth our making the following bold statement: "Windows is bad at being an Internet application server, just as UNIX is bad at being a workstation operating system.''
This is somewhat of a sweeping generalization, and there are exceptions to the rule. But the fact is that tens of thousands of ISPs and big businesses in the United States alone can't be wrong. Although Windows will frequently be found in the corporate environment as an Exchange server or domain controller, it is UNIX that hosts Web sites and DNS, and routes mail at SMTP-level across the whole of the Internet. Similarly, although there are those who choose to use Linux with X window managers such as Enlightenment, Gnome, and KDE on their laptops, they are in a minority. Most people recognize that Windows excels on the desktop while UNIX excels as a server environment.
The reasons for this distinction are really quite simple. The Windows interface is optimized for the desktop because it has undergone year after year of development. Many thousands of hours have gone into researching and evolving the Windows user interface to make it intuitive and efficient. It's not perfect, but it is better than the equivalents offered by its UNIX counterparts.
Similarly, Windows isn't very good at being an Internet services server. As of this writing, Microsoft's Internet Information Services (IIS) is the default and most popular choice for hosting Web sites on the Windows platform. Although it is vastly better than it used to be, IIS is still suffering from the ongoing discovery of major and widely publicized security flaws on a fairly regular basis as well as often being regarded as unstable and unreliable by systems administrators. In addition, the massive overhead of the Windows environment means that dedicated Windows servers on the Internet still carry enormous amounts of unnecessary baggage. A server with 2 GB of RAM could easily have 512 MB chewed up by the operating system and its various services, with only 64 MB of that being used to actually power the Web server running on it. By contrast, UNIX is smooth, sleek, and streamlined. Admittedly, it's not quite as easy to configure, but it's infinitely quicker, more stable and reliable, and a greater respecter of resources.
You can probably see where this is going. There is an argument for using IIS/Windows-based Web servers for ASP-based Web sites, of course, because ASP on UNIX is incredibly difficult to get working successfully. But this is a PHP book, and it is fair to say that PHP on Windows is every bit as bad an idea as is ASP on UNIX.
Even if you are passionately committed to using Windows in the server, you will find that you are fighting a losing battle. The ISPs that will ultimately host your application simply won't run PHP on Windows, for all the reasons we've just discussed. They will run PHP on UNIX period. If you want to develop for PHP on Windows, do so, but you're only going to be deploying onto a UNIX environment in the end, and it must be fairly obvious that it is always preferable to replicate your ultimate production environment as closely as possible when you develop.
There may be legitimate times when, for example, you are developing an Intranet platform for a client whose setup is entirely Windows based, and insists you deploy onto the client's Windows-based environment. With this in mind, there are notes at the end of this appendix to help you out with the differences. This will be the exception, however, not the rule. You will almost always deploy onto an ISP's servers.
With this in mind, this book assumes that your PHP installation is on UNIX, not Windows. This assumption will be applied uniformly throughout and is evident in all examples demonstrated, without exception. PHP on UNIX is the choice of the professional, and this is a professional's book.
Don't panic. This does not mean that you need to use UNIX yourself. Indeed, the earlier appendix on the various development environments such as Zend Studio suggests that Windows is the best platform to use on your desktop, and indeed it is. The development server you will use, which could be situated just a couple of inches away from your own PC, will need to run UNIX but your workstation won't.