PHP 5 Advanced: Visual QuickPro Guide (2nd Edition)-->Errata
Unfortunately, despite the best efforts of myself, the technical editor, the copy editor, and the line editor, despite the multiple revisions, errors still occur. This page lists all the errors found in the book.
Note: errors are corrected in subsequent printings and therefore your particular copy may not contain all of the following.
You may also find the solution to your problem by using the book's corresponding forum. Signficant 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:
| Chapter | Page # | Description | Date Added |
| 1: Advanced PHP Techniques | 10 | The "tasks" table definition as is won't work properly. When the date_completed column is updated, it also updates the date_added. This occurs because MySQL updates the first TIMESTAMP column in the table when that record is inserted or updated. The solution would be to define both date_added and date_completed as DATETIME, then change the INSERT queries to set the date_added column to NOW(). | August 30, 2007 |
| 1: Advanced PHP Techniques | 15 | On the second line of code under Step 9, the word "its" should not be there. The corresponding script is correct. | April 01, 2007 |
| 1: Advanced PHP Techniques | 16 | In Step 12, the fieldset should be closed before the form is closed. This also applies to lines 79 and 80 of Script 1.2 and lines 69 and 70 of Script 1.6. | April 01, 2007 |
| 1: Advanced PHP Techniques | 39 | In the first step, add_task.php should refer to Script 1.2, not Script 1.1. | |
| 2: Developing Web Applications | 76 | The comment on line 15 of Script 2.7 should state that the cache interval is 6 hours, not 24. | May 19, 2008 |
| 3: Advanced Database Concepts | 96 | In the very last sentence, it should say One source of... ("One" instead of "Once"). | May 21, 2007 |
| 3: Advanced Database Concepts | 97 | In creating the zip_codes table, the longitude field should be defined as DOUBLE(9,6) instead of DOUBLE(8,6) to accommodate longitudes, like Hawaii and Washington state, that have 3 digits in front of the decimal point. | July 10, 2007 |
| 3: Advanced Database Concepts | 115 | The query in Step 10 has an extra - before 95.276050. | July 09, 2008 |
| 4: Security Techniques | 125 | The function referenced in item 10 should be mysqli_real_escape_string(). | May 19, 2008 |
| 4: Security Techniques | 139 | The comment on line 47 of Script 4.2 should read Strip tags and encode quotes:. | August 30, 2007 |
| 4: Security Techniques | 159 | The first line of code is missing an "i" in "deinit". It should read mcrypt_generic_deinit($m);. | January 26, 2008 |
| 5: E-Commerce Techniques | 172 | The first entry in Tables 5.4, 5.5, and 5.6 should be of type TINYINT. | July 09, 2008 |
| 5: E-commerce Techniques | 201 | Line 60 of Script 5.5 should be if (mysqli_num_rows($r) >= 1) {. This change also applies to the last line of code under Step 7 on page 203. | May 14, 2007 |
| 5: E-Commerce Techniques | 203 | In the code under Step 8, the echo statement should have ...gw_id=$gw_id.... The corresponding script is correct. | July 09, 2008 |
| 5: E-Commerce Techniques | 209 | On line 5 of the code under Step 6, the variable should be $gw_id, not $gwid. The right code is USING (size_id) WHERE gw_id=$gw_id. The code in the corresponding script is correct. | January 26, 2008 |
| 6: Basic Object-Oriented Programming | 238 | On line 20 of Script 6.1, and in the code under step 5, the Dutch version should be Hallo, wereld!. This also affects Figure 6.1 on page 243. | May 14, 2007 |
| 6: Basic Object-Oriented Programming | 250 | In the last Tip, it should say that both rectangles have the new dimensions as $r1 and $r2 refer to the same object. In PHP 4, $r1 and $r2 would be two different objects. | July 10, 2007 |
| 6: Basic Object-Oriented Programming | 250 | The third line of code in the second tip should
read return ($this->width * $this->width); |
November 08, 2007 |
| 7: Advanced Object-Oriented Programming | 264 | In the last sentence of the third paragraph, "reusability" is misspelled. | July 09, 2008 |
| 7: Advanced Object-Oriented Programming | 265 | In Figure 7.4, 'attribute4' of GrandchildClass should not be grayed out as it does not appear in ChildClass. | April 01, 2007 |
| 7: Advanced Object-Oriented Programming | 267 | The title value in the code for Step 1 (right-hand column) should be "Pets", not "Rectangle". The corresponding script is correct. | July 09, 2008 |
| 7: Advanced Object-Oriented Programming | 283 | Line 78 of Script 7.4 should say ...modify $parent->protected.... This change also applies to the fifth line of code under Step 8 on page 286 and to Figure 7.14 on that same page. | May 14, 2007 |
| 9: Networking With PHP | 361 | The last line under Step 9 should refer to the check_url() function (singular). | July 09, 2008 |
| 9: Networking With PHP | 367 | In the second tip, it should say ...the host name associated with... (without the "of"). | July 10, 2007 |
| 11: PHP's Command-Line Interface | 435 | The first line of code under Step 3 should refer to $_SERVER['argv'][1]. The corresponding script is correct. | July 09, 2008 |
| 13: Ajax | 501 | In Script 13.4, the closing FORM and FIELDSET tags should be reversed on lines 33 and 34. This also affects Steps 4 and 5 on page 503. | April 15, 2008 |
| 14: XML and PHP | 549 | In the eighth line in the left-hand column, it should refer to the xml_parser_create() function (as in the following line of code). | April 15, 2008 |
| Click here to view the errata in the order they were submitted. Click here to view the most recent errors first. Click here to view the errata by page number. |
|||
Submit an Error:

Newsletter #15 Released
Newsletter #15 went out in early August but I've been remiss in posting this update about it. It's relatively short, with most of the discussion on the business side of creating your own business. You can read it online at http://dmcinsights.com/newsletter.php. The next newsletter should go out in a few days.(September 2, 2008)
Temporary Site Outage
After performing some routine maintenance, the DMC Insights, Inc. server will need to be rebooted on Friday, July 11, 2008, between 4:00am and 7:00am EST. The Web site should be unavailable for no more than 15 minutes. I apologize for any inconvenience.(July 9, 2008)
Newsletter #14 Released
I just sent out the latest version of the newsletter. It covers a bunch of different things, with some early thoughts on the Ruby programming language. You can read it online at www.DMCInsights.com/newsletter.php.(July 9, 2008)
