Skip to content


"PHP for the Web: Visual QuickStart Guide" (3rd Edition) Errata

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 Added
4: Using Numbers78In Step 7, there’s no need for the closing P tag at the end of the code. This also applies in line 49 of Script 4.2 on page 76.February 14, 2009
6: Control Structures122Line 3 of the first paragraph should refer to register.html, not feedback.html.October 26, 2009
7: Using Arrays182The message on line 25 of Script 7.9, also found under Step 5 on page 183, should say “one” instead of “once”.July 7, 2010
8: Creating Web Applications205In the fourth paragraph, the variable $timestamp should actually be $ts, to match the code in the above line.May 24, 2009
8: Creating Web Applications206Line 18 of Script 8.7 should use a closing EM tag. This also applies to the code in Step 5 on page 207.October 26, 2009
9: Cookies and Sessions269In the section on sessions, I say that you should use the unset() function on the $_SESSION array. This is actually not the proper way to reset the $_SESSION variable. Instead, use $_SESSION = array();,November 1, 2009
9: Cookies and Sessions270In the final tip the reference should be to session.use_trans_sid, not enable_trans_side.February 14, 2009
11: Files and Directories304I should have made clear that the stream_encoding() function only exists as of PHP 6. This also applies to line 20 of Script 11.1 (on page 305) and to the corresponding code in Step 6 on page 307.May 25, 2010
11: Files and Directories341At the end of the paragraph, it should refer to auto_detect_line_endings, not auto_detect_line_encodings.May 25, 2010
11: Files and Directories344On line 53 of Script 11.7, and in the correpsonding code under Step 12 on page 344, the password field should have the name “password”, without the number “1″.November 1, 2009
12: Intro to Databases352In the first sentence of the last paragraph, it should say “…the message from being immediately displayed.”November 6, 2010
12: Intro to Databases375In the code under Step 5, the second reference to $row['entry_id'] is missing the first apostrophe.October 26, 2009
13: Regular Expressions402In the last paragraph, it should say …but (bon)* matches zero or more bon’s (bonjour or bonbon or no bon’s at all).November 1, 2009
Appendix A: Installation and Configuration423The last word in the explanation of Step 2 should be parenthesis, not parentheses.October 26, 2009

10 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Arlene says

    There’s also a few instances throughout the later chapters where a single quoted object such as “password” has both single and double quotations….. for example on page 335 it states to type:

    if (empty($_POST["password1'])) {

    It starts with a double quote and ends with a single. This happens a lot throughout the entire book, not just on page 335.

    • Larry says

      Are you viewing an electronic version of the book? Because what you’re seeing is not in the printed version.

      • Arlene says

        Yes, I am using an electronic version. Sorry, I should have mentioned that.

        • Larry says

          Okay, thanks for confirming that and I apologize for the problems. I’ve let the publisher know about this.

  2. Namro says

    Page 352, “…the message from begin immediately…” should read “…the message from being immediately…”

  3. Roy says

    Is there another location for help in finding a good PHP-capable editor. The link mentioned on page xvii in the 3rd edition http://www.dmcinsights.com/links/1 is no longer available.

    • Larry says

      Sorry about that. I changed sites and systems. You can use the support forums or just search Google. It really depends upon the OS you’re using, whether you want an IDE or text editor, and how much you’re willing to spend.

  4. Chick says

    Dear Mr. Ullman,
    In your book, Chapter 11, you mention that when writing to an external file, you should insert a line just after the creation of the file pointer:
    stream_encoding($fp, 'utf-8');

    I am using php 5.2.1 on my local windows xp computer. When i insert that code into my page, I get:
    Fatal error: Call to undefined function stream_encode() in C:\htdocs\phpdw\blah
    blah\blah on line 14

    (I’ve changed the details of the file path to blah…they are not specifically relevant to the main problem here)

    When I search the php manual, I can’t find much about this function, either:

    PHP Manual
    stream_encoding
    Description
    bool stream_encoding ( resource stream [, string encoding] )
    (no version information, might be only in CVS)

    The function is apparently not available in some currently available and commonly used php versions. I am wondering what your opinion is of this, and if you agree, whether you can suggest an alternative function to assure data are encoded properly.

    Thank you.
    Chick

    • Larry says

      Hello Chick, sorry for the confusion. As I’ve written in the errata above, this function is PHP 6 only, meaning you should remove it on your version of PHP.

Continuing the Discussion

  1. Coding issues with PHP - HELLLP!! - Page 2 - Webmaster Forum linked to this post on March 26, 2011

    [...] the Eratta for the book. e.g. (not sure this is the right edition for the one you are using though) http://www.larryullman.com/books/php…dition/errata/ First thing I do is go look for eratta when I get a technical book. __________________ HTML [...]

If you need quick assistance with a question or problem related to one of my books, please use the support forums instead.

Some HTML is OK

or, reply to this post via trackback.