[PHP for the Web:
Visual QuickStart Guide](/books/php-for-the-world-wide-web-visual-quickstart-guide/)
Unfortunately, despite the best efforts of myself, the technical editor, the copy editor, the line editor, the proofreader, and despite the multiple revisions, errors still occur. This page lists all the errors found in the book since it went to print.
Note: errors are corrected in subsequent printings and therefore your particular copy may not contain all of the following. You may also be experiencing problems not caused by a mistake in the book. If so, you may find the solution to your problem by using the book’s corresponding forum. Significant changes in the technology will be addressed there and you can also find problems and solutions encountered by other readers.
Known Errors in the Book:
Click on a column heading to sort the table by that column. ChapterPage #DescriptionDate AddedIntroduction0On page xvii, Chapter 14, Debugging is inadvertently referred to as Chapter 15, Debugging.July 10, 20011: Getting Started2The second Tip should begin (change in italics) You can also check with your ISP to see….June 10, 20011: Getting Started8It states that printf() would be discussed in Chapter 13. It is actually discussed much earlier in the book–in Chapter 4, Using Numbers (pages 43-44).February 3, 20022: Variables22In the last full paragraph, curly quotes are used instead of straight quotes.February 9, 20032: Variables24Chapter 7, “Using Arrays”, is inadvertently referred to as Chapter 6.January 1, 20043: HTML Forms and PHP32Figure 3.2 does not end with a closing HTML tag.September 24, 20033: HTML Forms and PHP33Scripts 3.4, 3.5, and 3.6 are missing the opening and closing parentheses in the print() statements. While this is technically acceptable, it does break with the conventions of the book.3: HTML Forms and PHP33In Script 3.4, Script 3.5 and Script 3.6 (pages 33, 35, and 37), the closing is missing. The downloadable versions of the scripts have been updated accordingly.3: HTML Forms and PHP33Script 3.4 and many others in the book require that register_globals be turned on. For more information, see this posting.May 1, 20034: Using Numbers45In the last Tip, the code should read $Number–;.4: Using Numbers45The last line of the first paragraph should read use “++” or “–” accordingly (the two minus signs were fused by the printer).July 10, 20014: Using Numbers45The line change line 10 of script 4.3 to read $tax++; should read change line 11….December 31, 20014: Using Numbers45In Script 4.3, line 6 is missing the inital opening bracket. The line should be
\[a-z\]{3}” would match abc, def, etc..8: Regular Expressions128The second pattern (testing en e-mail address) is missing the ending space before the final quote (as explained in the second paragraph of page 129.8: Regular Expressions131The text for step 7 should really be printed as part of step 6.May 25, 20019: Creating Functions135The closing tags in Script 9.1 through Script 9.4 are missing. While this will not affect the execution of the script, they have been changed in the downloadable versions.July 10, 20019: Creating Functions139In Script 9.4 and in the corresponding instructions, the second morning shoud be afternoon.September 24, 20029: Creating Functions140The last tip should read (changes indicated by italics): Technically if you pass a number as an argument in a function, it does not need to be within quotation marks but there is no harm in using quotes anyway to remain consistant as to how arguments are passed.May 25, 20019: Creating Functions148Scripts 9.7 and 9.8 contain extra spaces after the word widget(s). This is nitpicking, but it did annoy the author when he discovered it!9: Creating Functions149Under step 5, the final paragraph should begin (change in italics) To demonstrate that the global statement… and not To demonstrate that the global variable ….May 26, 20019: Creating Functions152Under step 5, the line of code should read: print (CalculatePayments ($TotalCost)); as it is in the corresponding script (one closing parenthesis is missing).May 26, 200110: Files and Directories156Figure 10.1 is repeated as Figure 10.2. Figure 10.3 should actually be Figure 10.2 and the real Figure 10.3 is missing. Click here to view the real Figure 10.3.10: Files and Directories159Script 10.1 is missing the closing HTML tag. While the page will still function properly, it does constitute poor form.10: Files and Directories160Scripts 10.3 and 10.6 are missing the php portion of the initial PHP tag. These scripts will still function properly if short tags are acceptable in your PHP configuration.10: Files and Directories160The closing tags in Script 10.3 and Script 10.6 are missing. While this will not affect the execution of the script, they have been changed in the downloadable versions.July 10, 200110: Files and Directories170In Script 10.6, the comment on line 10 mistakingly states that the WriteToFile function takes URL and Description as its arguments. It actually takes Username and Password. While this won’t affect the execution of the script, it has been changed in the downloadable versions available online.June 13, 200110: Files and Directories170In step 12 contains an extra srand(mktime()); which should not be there. The corresponding Script 10.6 is correct.July 26, 200110: Files and Directories170Script 10.6 has quote marks around the permisions for the mkdir() command. These quotes seem to cause problems on some systems. If you are experiencing difficulty with this aspect of this script, remove the quotation marks.August 14, 200110: Files and Directories182The last sentence of the caption to Figure 10.16 should read (addition in italics) Checkboxes are displayed giving the user the option of deleting, renaming, and uploading files.May 26, 200111: Databases186The closing tags in Script 11.1, Script 11.2, Script 11.4, and Script 11.5 are missing. While this will not affect the execution of the script, they have been changed in the downloadable versions.July 10, 200111: Databases187The images in Chapter 11 are off. First, Figure 11.2 should be similar to that in Figure 11.4. Figure 11.3 should be a simple “The database, NewDatabase, could not be created!” message. Finally, the images printed as Figures 11.2 and 11.3 actually belong with the script running from pages 193-196. Ugh.July 9, 200111: Databases199On page 199, under step number 4, the line $Result = mysql_db_query ($Query, $Link); should read $Result = mysql_db_query ($DBName, $Query, $Link);
as it does in the corresponding script (Script 11.5).12: Cookies204Scripts 12.1, 12.2 and 12.3 are missing the php portion of the initial PHP tag. These scripts will still function properly if short tags are acceptable in your PHP configuration.12: Cookies204Script 12.1 is missing the opening and tags. This also applies to step 5 on page 205.March 19, 200312: Cookies208In Script 12.2, the opening tag is missing.June 8, 200213: Creating Web Applications215In Script 13.1, the closing </ TR> on line 11 (and also in Step 4) is missing it’s slash.April 15, 200213: Creating Web Applications229Script 13.9 is missing the php portion of the initial PHP tag. This script will still function properly if short tags are acceptable in your PHP configuration.14: Debugging238Scripts 14.3 and 14.4 are missing the php portion of the initial PHP tag. These scripts will still function properly if short tags are acceptable in your PHP configuration.14: Debugging243In steps 5 and 6, the slashes before the header() lines which would indicate that they are commented out are missing. The corresponding script is correct, however.July 10, 200114: Debugging245The closing tag in Script 14.6 is missing. While this will not affect the execution of the script, it has been changed in the downloadable version.July 10, 2001Appendix A: Installation251There are a couple of errors. The first is that the printer fused two dashes (–) into one. Thus, in steps 5 and 7, the code –with-apache, –enable-track-vars and –activate-module should all begin with two dashes. Secondarily, the code in step 7 should read:
cd ../apache_1.3.14 ./configure –activate-module=src/modules/php4/libphp4.a (The ’s’ is missing after module=.)April 6, 2002Appendix A: Installation251In step 4, two hyphens are fused into one em dash. The code should read cd ../apache_1.3.14 ./configure –prefix=/www.August 17, 2003Appendix C: PHP Resources266The first line of Table C.1 should read ! ++ – (again, the two minus signs were fused together).