Datasheet
P1: KTX
WY027-01 WY027-Mercer WY027-v2.cls June 5, 2004 0:44
Chapter 1
within Services doesn’t mean they are on. Stop and restart them if you need to reassure yourself.
You can also check to make sure the Web server is running on the default Web site in Internet
Services Manager. For Apache on Linux, check the httpd service (you can also test it by entering
http://localhost in your browser).
2. Place a simple HTML Web page in the wwwroot folder, making sure that it has .htm or .html
as the extension for the filename (such as test01.htm), and bring the page up in your browser.
Make sure you are using http://localhost/test01.htm to bring up the file, not the file
location (such as D:\inetpub\wwwroot\test01.htm).
3. If the HTML Web page displays properly, you can be sure your Web server is functioning. This
implies (assuming your PHP page cannot be displayed) that something is wrong with your PHP
installation. Of course, if you see other messages (such as 404 Page Not Found) you may simply
not be finding the file properly, so you’d need to take a second look at the file name you chose,
the name of your Web folder, and so on.
4. If you think that something is wrong with your PHP installation, reexamine the installation
process you used, going carefully through each step, and make sure you placed all the PHP files
in the places they belong. Pay particular attention to the names of Windows and System folders
because these may differ depending upon your installation of Windows or Linux.
5. Check file permissions. File permissions are very important in Linux systems, and to a lesser
degree in Windows 2000 or desktop Windows operating systems. You should be logged in as
root or administrator on Linux and Windows systems, and should be able to change permissions
as necessary to run scripts from within Web server folders. For external hosting accounts any
good FTP utility can modify file permissions on Linux systems.
It’s likely that following these steps will isolate the problem so that you can fix it.
Configuring PHP
During installation you modified the php.ini file to affect the way PHP runs and what features it
includes. Appendix F, “Configuring PHP5,” at the end of the book discusses the major settings in the
php.ini file, as well as some of the extensions currently available for PHP, but in this section we’ll go
over a few of the most important PHP configurations settings and extensions.
php.ini
The php.ini file is parsed when PHP is first loaded and executed, so that PHP behaves (for any script
running on that Web server) in a particular way. All lines that are not preceded by a semicolon are
working commands; think of everything else in the file as a comment. Following is the text of several
sections of the php.ini-recommended file. The settings shown are important because they have a
direct effect on how PHP behaves (under common operating circumstances), will affect your code, or
may affect the security of your applications:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
28