Home page Home | Table of contents Table of Contents | Download the code Download the Code | Book translations Translations | About Jason About the Author
Beginning PHP and MySQL, Third Edition - the book

PHP and MySQL Made Painless.

Vital Statistics: 38 chapters, 1,044 pages and 500+ examples!!

Second Edition Errata and Suggested Revisions

Page 13 Windows Apache 2.2.X incompatibility
Apache 2.2.X on Windows is incompatible with PHP. Downgrade to 2.0.59 to resolve the problem. UPDATE: This problem has been resolved, and versions of Apache 2.2.X and newer work just fine with PHP.


Page 33
Minor typo in the variables_order() section. The second sentence should read "..., if register_globals is enabled...".


Page 21
The fourth bullet point on page 21 should refer to php_flag, and not php_value.


Page 85
The output at the top of page 85 should actually read:

Online Resources:<br />
<a href="http://www.apress.com">http://www.apress.com</a>
<a href="http://www.php.net">http://www.php.net</a>
<a href="http://www.apache.org">http://www.apache.org</a>


Page 54
The last sentence in the first full paragraph at the top of page 54 should refer to $fh and not $link.


Page 88
The following code snippet is incorrect:

<?php
   print "this is an invalid include file";
?>

It should read:

<?php
   print "this is a valid include file";
?>


Page 86
The output at the top of page 86 is incorrect. It should read:

Non-prime number encountered: 48
Non-prime number encountered: 42

Of course, your exact output may vary because this example randomly selects numbers and compares them against the predefined array.


Page 92
In the output on page 92, the output should show the year 2006 and not 2005.


Page 93
The following line is incorrect:

echo "Tax is: ". $tax*100."<br />";

It should read:

echo "Tax is: ". $tax*100."%<br />";


Page 115
The Note should refer to Chapter 13, and not Chapter 12.


Page 108
The output for the third example in the range() section is oddly wrong. It should read:

// $letters = array("A","B","C","D","E","F");


Page 128
In the example at the top of the page, $array3 should include the key/value pair "HI" => "Hawaii".


Page 111
In the first example, the // is missing before:

$states = array("Alaska","Hawaii","New Colony?","New Colony?");


Page 129
On page 129, the very last line of code should read:

print_r($cards);


Page 139
The following sentence is incorrect:

Any attempt by an object to access a protected field will result in a fatal error.

It should read:

Any attempt by an object to access a private field will result in a fatal error.


Page 162

The comment in Listing 7-3 is incorrect:

# Define a method unique to Employee

It should read:

# Define a method unique to Executive



Page 201
In the preg_match() section, the last sentence of the first paragraph should refer to a case-insensitive search. The search is case-insensitive because of the /i found in the regular expression.


Page 211
I managed to foul up the French grammar in the example and corresponding output. Therefore this line is incorrect:

$advertisement = "Coffee at 'Cafè Française' costs $2.25.";

It should read:

$advertisement = "Coffee at 'Café Français' costs $2.25.";

This means the corresponding output is also incorrect. It should read:

$advertisement = "Coffee at 'Caf&eacute; Fran&ccedil;ais' costs $2.25.";


Page 206
The code example at the top of the page is incorrect. The strlen() function should take $pswd as a parameter, and not $string.


Page 196
The first line of the code example found in the ereg_replace() section should read:

$text = "This is a link to http://www.wjgilmore.com/";


Page 241
The four functions isexecutable(), isreadable(), and iswriteable() are actually is_executable(), is_readable(), and is_writeable().


Page 245
In the section file_get_contents(), the following line is incorrect:

echo "<a href=\"mailto:$email\">$name/a> <br />";

It should read:

echo "<a href=\"mailto:$email\">$name</a> <br />";


Page 257
The second code example on page 257 should use system() and not exec().


Page 830
In the code example, the following line is incorrect:

$keywords = $mysqldb->mysqli_real_escape_string($_POST['keywords']);

It should read:

$keywords = $mysqldb->real_escape_string($_POST['keywords']);


Buy the book from Amazon.com!

Buy the book direct from the author!

Hire Jason for your next project!

Useful Articles and Tutorials

Creating a Code Search Engine with PHP and MySQL
April, 2007 | Developer.com

Four Ways to Optimize Your MySQL Database
April, 2007 | Developer.com

Integrating MP3 Audio Messages Into Your Website
March, 2007 | Developer.com

Developing and Ajax-Driven Shopping Cart with PHP and Prototype
January, 2007 | Developer.com

More Articles and Tutorials...

Tip of the Week

Did you know you can quickly look up a PHP function simply by appending it's name onto the end of www.php.net? For example, to learn more about the explode() function, just navigate to www.php.net/explode.

Bulk Purchases

Interested in using the book within the classroom, or want to make several copies available to your development team? A 10% discount will be applied to purchases of more than 10 copies! Contact Jason at jasonATwjgilmore.com to make arrangements.

Copyright © 2000-2008 W. Jason Gilmore