Errata
The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update
Version | Location | Description | Submitted By | Date submitted | Date corrected |
---|---|---|---|---|---|
Printed | Page 7 1st and 3rd paragraph under What is MySQL heading. |
At the end of the 1st paragragh in this section, the sentence currently reads: "And, it has thousands of developers that at some point have helped improved its code base." The tense of the word should simply be improve, since the verb "helped" is already in the past tense. Finally, in the last sentence of the 3rd paragraph in this section, the sentence currently reads, in part,: "use functions that let PHP scripts to do just about anything . . ." I think the word "to" should be dropped/omitted. Then the sentence would read: let PHP scripts do just about anything . . . Thanks, Will Garland Note from the Author or Editor: |
Will Garland | Jan 08, 2013 | |
Printed | Page 17 Figure 1-2 |
This figure shows two arrows going to the displayed page, one from the HTML rendered and one from the CSS renderer. This is not conceptually correct. The output of the two renderers should be combined as they are in Figure 1-3 and a single arrow should go into the displayed page, again as in Figure 1-3. Note from the Author or Editor: |
Jesse Heines | Jun 05, 2013 | |
Page 19 code segment, 4th line |
-------------------------------------------------- <html> <head> <link href="../../css/phpMM.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"><h1>PHP & MySQL: The Missing Manual</h1></div> <div id="example">Example 1-1</div> <div id="content"> <h1>Hello, <?php echo $_REQUEST['name']; ?></h1> <p>Great to meet you. Welcome to the beginning of your PHP programming odyssey.</p> </form> <!-- THE WRONG PART --> </div> <div id="footer"></div> </body> </html> -------------------------------------------------- form tag has been used without using its opening counterpart. Although it does not have any effect on code, but is semantically wrong. Note from the Author or Editor: |
Sachin Sharma | Jan 16, 2013 | ||
Page 21 Note box |
"...you want to have both a way to use OF PHP and MySQL..." Should have the "of" removed. Note from the Author or Editor: |
Cole Jackowski | Mar 08, 2013 | ||
Printed | Page 21 Next-to-the-last line of the paragraph that starts with "Both choices..." |
"Note only that, ..." should be "Not only that, ..." |
Jesse Heines | Jun 05, 2013 | |
Page 41 4th Line |
The text as written in book "Now, go to the directory in which you saved your program, sayHello.php. You can do a directory listing with dir (in Windows) or ls (on the Mac) to ensure that you’re in the right directory. Once you’re in the right directory, type this into your command line: php sayHello.php" The program will not run in windows. Because when I run the program, from folder/directory in which I have saved my programs(E:\wamp\www\SS in my case) is separate from the folder/directory in which the php.exe lies (E:\wamp\bin\php\php5.3.13 in my case) and the folder/directory containing php.exe(in my case the pathb is E:\wamp\bin\php\php5.3.13) is not on the default path. So we will either have to supply the complete path E:\wamp\bin\php\php5.3.13\php.exe sayHello to run the program or we will have to add E:\wamp\bin\php\php5.3.13 to default path. Note from the Author or Editor: |
Sachin Sharma | Jan 17, 2013 | ||
Printed | Page 42 Paragraph just after the figure |
A period is missing from the end of the second sentence in this paragraph. Note from the Author or Editor: |
Jesse Heines | Jun 05, 2013 | |
Printed | Page 48 Up To Speed - Directory Assistance |
The images referenced in the downloaded phpMM.css aren't pulling up when I open "sayHelloWeb.HTML". I get the green background, so apparently it is finding the CSS file, but it can't find the images referenced in the CSS file. Here's one of the problem lines in the CSS file: background: #75bb45 url('/phpMM/images/tmm_php-mysql_background.png') repeat-y; The downloaded directory structure does not include the directory "phpMM". I had my "images" folder in the same directory as my "sayHelloWeb.HTML" file. I fixed the problem by moving my "images" folder into the "css" folder. Now the relative URL works. Summary: The printed instructions say to have the "images" directory at the same level as the same HTML file as well as the "css" directory. It won't work unless the "images" directory is inside the "css" directory. Note from the Author or Editor: |
William Young | Apr 14, 2013 | |
Printed | Page 75 3rd paragraph, toward the end of listed item 3 |
The text says "add the handle to the beginning of $twitter_url." It should say "add the handle to the end of $twitter_url." The following page, page 76, correctly states this in paragraph 5 when it says: "If there is no @, this code simply adds the handle to the end of $twitter_url" Note from the Author or Editor: |
Anonymous | Feb 26, 2013 | |
Page 86 3/4 down the page |
"This is repeated until there are no more values from left in the array." Should have "from" removed. Note from the Author or Editor: |
Cole Jackowski | Mar 10, 2013 | ||
Printed | Page 98 3rd paragraph / Numbered List |
As someone with zero experience with Mac's "Terminal" app, this section was kind of confusing: "SET UP MYSQL FOR YOUR USER PROFILE You can make this easier with a few quick edits to your profile and setup..." I followed the list of steps [best I could] but was not able to create a shortcut. Steps 5 and 6 are the lines that seem unclear to me: " 5. Find or add a line to update your PATH variable " " 6. Now save your .bash_profile, and restart Terminal. " A few screen shots or a box with a more detailed explanation would be really helpful. Note from the Author or Editor: |
Tamahl Gorham | Mar 30, 2013 | |
Page 149 6th line of code segment on page |
in the code segment if ($result) { echo "<p>Your query was processed successfully.</p>" echo "<p>{$query_text}</p>"; } the echo statements if not terminated. Add ";" the this. The segment should read: if ($result) { echo "<p>Your query was processed successfully.</p>"; echo "<p>{$query_text}</p>"; } Note from the Author or Editor: |
Sachin Sharma | Jan 23, 2013 | ||
Page 182 Code Segment 6th line |
In the code segment, 6th line has error as printed in the book: $facebook_url = str_replace("facebook.org", "facebook.com", trim($_ REQUEST['facebook_url'])); because of this line break, string $_REQUEST is considered as to words "$" and "_REQUEST". Solution: shift the line break as: $facebook_url = str_replace("facebook.org", "facebook.com", trim($_REQUEST['facebook_url'])); Note from the Author or Editor: |
Anonymous | Jan 24, 2013 | ||
Printed | Page 210 Near the bottom of the html code example |
In the code example, Brett adds the form html to upload a file, but forgets to add the "<br />" at the end of the second new line, which causes the page to display all wonky, making it not look like the example on 211. Minor error. Note from the Author or Editor: |
John Foster | Jul 27, 2013 | |
Printed | Page 212 3rd line of code segment |
in the code segment: $insert_sql = "INSERT INTO users (first_name, last_name, email, bio," . "facebook_url, twitter_handle) " . "VALUES ('{$first_name}', '{$last_name}', '{$email}','{$bio}' " . "'{$facebook_url}','{$twitter_handle}');"; a comma ( , ) is missing in the 3rd line after {$bio}. Should be: {$bio}', " . Note from the Author or Editor: |
Rick | Feb 06, 2013 | |
Page 216 show_user.php code |
I go an undefined variable error when running the code as it is printed - specifically "$position" for the turning twitter_handle into a url. I had to add $position = strpos($twitter_handle, "@"); before the "$twitter_url = ..." line. Was that required, or was I missing something else? Note from the Author or Editor: |
Sean Conley | Jan 24, 2013 | ||
Page 233 2nd paragraph under Figure 8-7 |
You do need to make one fix, though: that backslash following up before a single apostrophe ("There\'s" in the first sentence) is no good. There is an error in this statement if you are testing this on your own machine. If you enter the following from page 232 using localhost in place of www.yellowtagmedia.com, you will not get a backslash when you test: http://www.yellowtagmedia.com/phpMM2/ch08/scripts/show_error.php?error_message=There%27s%20been%20a%20problem%20connecting%20to%20the%20database I don't know whether this a PHP problem or if the author forgot to include the backslash in the above statement. Nevertheless, it was a cause of frustration and multiple rereads. This needs to be corrected. Note from the Author or Editor: |
haitiman | Jul 11, 2013 | ||
Printed, PDF | Page 242 bottom heading |
In the section titled "Redirecting on Error", the subsection is titled "Update connect.php to show_user.php". It should instead be titled "Update connect.php to show_error.php" since this is the purpose of the subsection. There is no mention of show_user.php. Note from the Author or Editor: |
Anonymous | Jan 21, 2013 | |
Page 246 2nd paragraph |
Error is here: "So, can you get your error handling to be that elegant? It's worth at try." Should be "It's worth a try." Note from the Author or Editor: |
haitiman | Jul 11, 2013 | ||
Printed, PDF | Page 394 In code |
Constants (VALID_USERNAME & VALID_PASSWORD) not being defined with correct syntax. These should be in quotes. Page shows define(VALID_USERNAME, "admin"); define(VALID_PASSWORD, "super_secret"); Should be define("VALID_USERNAME", "admin"); define("VALID_PASSWORD", "super_secret"); Note from the Author or Editor: |
David Forshaw | Jun 19, 2013 | |
ePub | Page 435 First to code snippets |
On show_user.php: $user_id = $_REQUEST['user_id']; does not work using a local mamp stack with Chrome. The user_id is not read from the browser cookie. If you change to: $user_id = $_COOKIE['user_id']; everything works fine. I read online that PHP 5.3 by default excludes cookies from $_REQUEST. It took about an hour to track down the problem, will likely be an issue for others as well. Great book by the way, I rated it highly on Amazon. Thanks! Note from the Author or Editor: |
Anonymous | Mar 11, 2013 |