Categories

Core PHP Programming 3/E Errata

These are the bugs found so far in the third edition.

08/26/2003

Til Mauder pointed out that Listing 23.7 names the table Message, but
the following code in Listing 23.8 refers to the table as bbsMessage.

Thanks, Til!

10/16/2003

Erin Doak caught an error in Chapter 2.

On page 53, second paragraph, right and left are reversed in couple of sentences about the :: operation.
It should read, “The left side of the :: operator should be the name of a class known
to the current scope. The right side may be the name of a method or constant.”

Thanks, Erin!

11/12/2003

Thomas Svenson noticed an error on page 109, 7th paragraph (second from bottom). The sentence
should read, “The class counter is incremented in the constructor and decremented in the
destructor.

Thanks, Thomas!

11/26/2003

Kevin Angus brought up a good point about MySQL and PHP. MySQL libraries are not longer
included in the PHP 5 source code. So, you may find you don’t have access to the
MySQL functions. You can read more about this issue in the PHP FAQ.

Related to this issue are the SQLite and MySQLi extensions. The former is a much lighter
replacement for using MySQL. The latter is a newer extension that you must use if
you use MySQL 4.1 or newer. Unfortunately, these extensions appeared too late to
include in the book. They will certainly be covered in the fourth edition, but
we currently haven’t decided when that might come out.

Thanks, Kevin!

12/12/2003

Harry DeLano points out that on page 936, I meant to write “such as inserting today’s
date“.

Thanks, Harry!

8 replies on “Core PHP Programming 3/E Errata”

Three errors, not noted in your errata for Core PHP 3 –
(1) pg 369 – typo – middle page – “coverts” s/b “converts.”
(2) pg 1059 typo – “file_exits” s/b “file_exists.”
(3) pg 106 listing 6.1 – the constructor refers to “$this->accesses++;” but accesses is not a property. Add $accesses to the private properties.

VERY useful book!

Page 424 indicates that the function:

array str_word_count(string text, integer mode)

returns an associative array in which the words are keys and the values are the positions. However, as illustrated in Figure 12.2, the associative array returned actually uses the positions as the keys and the words as the values.

Listing 9.27on page223 does not function correctly on a Windows XP system with PHP 5.0 installed on an Apache 2.2 as a module. The problem is that the value of PHP_OS is “WINNT”. Thus the correct fix or statement for line 4 should be:

if(eregi(“winnt”, PHP_OS))

or, better yet:

if(eregi(“win”, PHP_OS))

to satisfy either case and assuming the original line:
( if(eregi(“windows”, PHP_OS))

works for other versions or configurations.

On page 948, Listing 26.11, lines 13-15, the $_REQUESTs need to be converted with intval() so mktime() will accept them as integers, rather than strings.

Thanks for the great book, the best one I have read as yet. Very comprehensive, including many topics not covered in other PHP books. Immensely helpful. Thankyou.

On page 109 of the Core PHP Programming 3rd Edition, The second to the last paragraph says “The class counter is incremented in the constructor and decremented in the constructor.” Should this be “…decremented in the destructor”?

I think this is a really great book. It has helped me a great deal.

Thanks!

Chapter 11 pg 402 in the description of sort(): change “Chapter 15” to “Chapter 21”

Leave a Reply

Your email address will not be published. Required fields are marked *