Académique Documents
Professionnel Documents
Culture Documents
July 2009
p.
printed.
p.12
Installing PHP
Although this book provides download and installation instructions for PHP 5.2, the newlyreleased (at the time of this writing) PHP 5.3 includes some new download options that arent covered in the book. There are four different versions of PHP 5.3. for Windows: VC6 Non Thread Safe, VC6 Thread Safe, VC9 Non Thread Safe, and VC9 Thread Safe. Talk about confusing! First of all, you definitely want a Thread Safe version of PHP. The Non Thread Safe versions are not suitable for use as a plugin for Apache.
Secondly, assuming you will install (or have already installed) a version of the Apache HTTP Server from httpd.apache.org (see page 13), you will need the VC6 version of PHP. In short, to follow the instructions in this book, you need the VC6 Thread Safe version of PHP 5.3 for Windows.
p.138
2nd paragraph
The first sentence should read "... by letting you insert special headers into the response sent to the browser."
p.15
code block 3
need to remove the semicolon from the beginning of the line when adding the directory information.
p.206
variable $jokeId is created with $jokeId = $row[0];. On the next line (after the comment), this variable is incorrectly referenced in the SQL DELETE statement as $jokeid (lowercase 'i'). It should be
$jokeId p.42
in both places.
As of PHP 5.3, the file you want to duplicate is called php.ini-development, not php.ini-dist. So the last line of code should be:
cp php.ini-development php.ini p.49
code block
As of PHP 5.3, the date function requires that a timezone be specified. Running the code as is will result in a warning to this effect. To fix this, edit the php.ini file and include a line like:
date.timezone = America/New_York
On pages 95 and 96, the book refers to welcome6.html and welcome6.php, which we've never explicitly said to create. You can still find these files in the code archive to follow along with the book. welcome6.php differs from welcome5.php in that we're using the generalpurpose $_REQUEST variable rather than $_POST.