NOTE: Please go to the respective web sites for PHP, MySQL and Apache to download the latest versions of the software.
Most of the errata consists of errors on the part of the layout people, with funky spacing and what not. For example, something you'll see in a handful of places is this: "if[...]else". Just assume it means "if...else".
All of the code in this edition assumes that register_globals = On in your php.ini file. Beginning with PHP 4.2, the default value is Off. You can either turn on register_globals, or you can modify the code to refer to variables as they exist within superglobals, i.e. $_SUPERGLOBALNAME[variablename] instead of $variablename. For more on superglobals, read the appropriate page in the PHP Manual.
Chapter 1: Installing and Configuring MySQL
- On page 6, step 3, the command needs a space. It should be:
mysqld --standalone
- WINDOWS users: If you don't have a file called mysqld.exe as part of your MySQL installation, and you do have a file called mysqld-shareware.exe, you can rename mysqld-shareware.exe to mysqld.exe and continue, or just use the command "mysqld-shareware --standalone" instead.
Chapter 3: Installing PHP4
- On page 39, in the configuration line in step 7, if you think the line break looks funky, it does. It doesn't need to break after "/usr/local". Just type it normally.
Chapter 7: Displaying Dynamic Content
- On page 94, the second example graphic should look like this.
Chapter 8: Sending E-Mail
- On page 121, the last sentence should read: "In the next section, you'll submit the form and see how this e-mail thing works."
Chapter 9: Using Your Filesystem
- On page 148, in step 5, the closing paragraph tag should be "</P>" and not "</Pp>".
- On page 150, in step 5, the code should read:
$myfile = @fopen($filename, "a") or die ("Couldn't open file.");
Chapter 11: Establishing a Connection
- On page 178, in step 3, the INSERT statement is missing a closing parenthesis. It should read:
insert into user (host, user, password) values ('localhost', 'sandman', password('tQ9472b')); - On page 187, the code in step 11 should read as follows:
$tables = @mysql_list_tables($db_names[$db_num]) or die("Couldn't list tables."); - If you want to see the same output as that in the last figure on page 194, you'll have to change the code in step 5 of page 193 to read:
$result = @mysql_drop_db($drop_db, $connection) or die("Couldn't drop database.");
Chapter 12: Creating a Database Table
- On page 207, in step 14, the text says there should be an "@" to suppress warnings, and it's not there. Pretend it is.
- On page 208, in step 21, the filename should be: do_createtable.php.
- On page 216, in step 8, there's a missing backslash in the SQL statement. The SQL statement should read:
$sql = "INSERT INTO $table_name (id, format, title, artist_fn, artist_ln, rec_label, my_notes, date_acq) VALUES (\"$id\", \"$format\", \"$title\", \"$artist_fn\", \"$artist_ln\", \"$rec_label\", \"$my_notes\", \"$date_acq\")";
- On page 219, in step 22, the closing form tag is not needed.
Chapter 16: Using Cookies
- On page 268, the second example graphic should look like this.
Chapter 17: Planning Your System
- On page 298, step 11 should use the concatenation operator (.=) instead of the assignment operator (=).
Chapter 19: Adding Contacts
- On page 308, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
Chapter 20: Modifying Contacts
- On page 320, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
- On page 327, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
Chapter 21: Deleting Contacts
- On page 340, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
- On page 346, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
- On page 343, the hidden form fields are explained in steps 20 and 21, yet appear in step 18 as well. You can put them in at any point, you just don't have to put them in twice.
Chapter 22: Working with Contacts
- On page 368, the if...else statement started in step 3 and ended in step 4 has an extra curly brace. Since the if statement is terminated in step 3, the } at the beginning of step 4 is unnecessary.
Appendix A: Additional Configuration Options
- On page 380, the title of the table should be "Some Configuration Options", as this is by no means a compelte list.
Appendix B: Essential PHP Language Reference
- On page 395, the character associated with this meaning: "Day of the week in text" should be D (capitalized).
Appendix E: Using the CD-ROM
- On page 425, the command in step 2 is missing a space. It should read:
mount /dev/cdrom /tmp
[last updated 2003-09-03]
