CHAPTER 1 Building a Development Server 2 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 2 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s W hen creating plain HTML web sites, it’s easy to develop them on a personal computer because no web server is needed to serve up the pages. You simply load them into your browser and display them. The same goes for JavaScript and even Flash. However, when it comes to PHP it’s a whole different ball game because you need a number of new programs, such as the PHP parser and interpreter, and a web server to take the output from PHP and return HTML pages. Plus, if you’ll be accessing any data, you’ll also need a database program such as MySQL. Until a few years ago, your only simple choice was to find a hosting company that would set you up with a server with all these options already in place. Alternatively, if you were an expert, you could install each of these items separately and configure them to work with each other, a process often fraught with many hours of tweaking and hair pulling before everything would work correctly. Recently, however, a number of WAMP, MAMP, and LAMP packages have sprung up. Respectively, these stand for Windows/Mac/Linux, Apache, MySQL, and PHP and they provide an integrated installation environment to automatically configure the various elements to properly interact with each other. Even so, some of them still needed a bit of tweaking on less-than-standard installations. Early 2009, though, saw the release of Zend Server CE from Zend, the company behind PHP itself. The CE stands for Community Edition, which means it’s free and community supported, and it’s truly a quality product. While not as powerful as the original Zend Server, which was designed for running and managing business-critical PHP applications in production, it’s absolutely perfect to use as a development platform, and is available for all of the following: • Windows XP, service pack 2 • Windows Vista (excluding Starter) • Windows 7 • Most flavors of Linux • Mac OS X 10.4 plus running on Intel chips Zend Server CE comes with everything you need, including Apache and PHP (and with a little configuring, MySQL, too) and is very easy to install. However, because the pr ocess varies by platform, I have divided its installation into different sections here. So please choose the one relevant to your computer. Windows XP, Windows Vista, and Windows 7 To install the program on a Windows machine, you need to visit the following URL and download the Windows installation file (see Figure 1-1): www.zend.com/en/products/server/ downloads-all. Once you have downloaded the installation file, which should be around 50MB in size, you will have an executable file in your downloads folder with a filename such as ZendServer- CE-php-5.2.10-4.05-Windows_x86.exe, depending on the version. To begin installation just C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 3 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 3 FIGURE 1-1 Downloading the Windows Zend Server CE installation program FIGURE 1-2 If prompted by User Account Control, click Yes to confirm installation. double-click the file. If you are running Windows Vista or Windows 7, and a User Account Control box such as that displayed in Figure 1-2, click Yes to continue. If you have already installed Zend Server CE and are now installing a newer version, another confirmation box will appear from the installer itself (see Figure 1-3). In this case, click Yes to continue. 4 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s 4 P l u g - i n P H P : 1 0 0 P o w e r S o l u t i o n s The screen in Figure 1-4 will appear. Click the Next button to continue. After a while, the installer will have gathered enough information to continue with the installation and you will be prompted to agree to the terms of the End-User License Agreement (see Figure 1-5). Next you are asked whether the program should perform a Typical, Full, or Custom installation (see Figure 1-6). Select Custom at this point so your setup will agree with the one described in this chapter. You can always re-install again later with different options if you need to. FIGURE 1-3 Click Yes when the Zend installer asks if you wish to continue. FIGURE 1-4 When prompted a second time, click Next to continue. C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 5 C h a p t e r 1 : B u i l d i n g a D e v e l o p m e n t S e r v e r 5 FIGURE 1-5 You must agree to the license agreement to be able to install Zend Server CE. FIGURE 1-6 Select the Custom installation option and then click Next. . following: • Windows XP, service pack 2 • Windows Vista (excluding Starter) • Windows 7 • Most flavors of Linux • Mac OS X 10.4 plus running on Intel chips Zend Server CE comes with everything. relevant to your computer. Windows XP, Windows Vista, and Windows 7 To install the program on a Windows machine, you need to visit the following URL and download the Windows installation file (see. need, including Apache and PHP (and with a little configuring, MySQL, too) and is very easy to install. However, because the pr ocess varies by platform, I have divided its installation into