Datasheet

P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
Getting Up and Running
ClearModulesList line in the le, you need to add the following line to the le. Although it doesnt
matter where you put it, it makes sense to locate it near other AddModule lines for easy access in the
future:
AddModule mod_php5.c
The AddModule line is not required unless you have a ClearModulesList line.
Finally, you tell Apache how to recognize a PHP program le by its extension. Further down the
document are some directives that begin AddType. To the end of these, add the following line:
AddType application/x-httpd-php .php
This tells Apache that all les that end in.php are PHP programs. Now youre done, so save the le.
Starting or Restarting Apache
Check to see if Apache is running by going into Services once again and checking the httpd service. If its
not running, start it. Verify that its running by opening the http://localhost test page. If everything
seems to be working OK (and youre not also installing on Windows), move on to the Testing Your
Installationsection to test that PHP is working properly.
The majority of Web hosting computers runs some version of Linux, such as Debian, RedHat, FreeBSD,
and so on. The Web server of choice for these machines is Apache. PHP is compatible with Linux and
Apache, so you can install and congure PHP on these systems. However, if you are not in charge of the
Web hosting computer (and many times you wont be) youll probably have little control over the
installation and conguration. If you nd yourself in this position (for example, if youve been hired to
work on an existing Web site running on someone elses server) you can simply verify the operating
system, Web server software, and PHP version so you can cope with whatever youve got as you develop
your PHP programs.
Installing PHP5 on Windows 2000/Internet
Information Server (IIS) 5
Before beginning the installation process, lets take a look at IIS. If its been properly installed using the
default settings, it should already be running. Select Start
Programs Administrative Tools Services
and scroll down to World Wide Web Publishing Service to see if IIS is currently running. If it isnt, start it up
If you need to install IIS, go to Settings
Control Panel and open Add/Remove Programs. Then click the
Components button to nd the list of components that can be installed in Windows 2000, including
Internet Information Server. Select IIS and then click the Details button to see all the services (such as FTP,
SMTP, and so on) that can be installed. Choose any youd like, but be sure to include World Wide Web
Publishing, and click the Finish button. IIS should be installed and running.
You can examine the installation of IIS by opening its documentation from your browser, using
http://localhost/iisHelp as the URL. You should see something like Figure 1-11, which shows IIS
5.0 running on Windows 2000.
19