Errata

PHP Cookbook

Errata for PHP Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 1
First code example

The example code comprising four print statements will not produce the output described under "It prints:"

It will print the four strings concatenated into a single sequence of characters.

The print command does not insert newlines at the end of each print operation.

Anonymous  Oct 20, 2015 
Printed Page 105
last sentence

A piece of text from the Discussion section of section 4.3 seems to have been accidentally copied to the Discussion section of 4.2.
Starts with "In PHP 5.0.0 and above..."

Anonymous   
Printed Page 105
last sentence

A piece of text from the Discussion section of section 4.3 seems to have been accidentally copied to the Discussion section of 4.2.
Starts with "In PHP 5.0.0 and above..."

Anonymous  Jun 18, 2008 
Printed Page 229
After "Discussion", 1st paragraph.

The text says: "... in the $_FILES superglobal array. For each file, there are four
pieces of information:
name :: The name assigned to the form element...".

This is not correct.

The $_FILES variable is a 2-D array. The first column contains the name(s) assigned
to the form input element(s) of type="file". The second column is a 4-column array
with information about each uploaded file. The "name" element in this array is the
original name of the file on the client system.

Anonymous   
Printed Page 336
2nd Paragraph

Last line in Solution reads:
$server->service($HTTP_RAW_POST_DATA);
page 337 2nd paragraph discusses this line and has it as:
$server->service($GLOBALS['HTTP_RAW_POST_DATA']);
The disscussion being correct.

Anonymous   
Printed Page 588
Last paragraph

The book recommends to set the "default_encoding" config to utf-8. However, I cannot find a config by that name anywhere in php.ini. Instead there is a "default_charset" config.

Joss Delage  Feb 19, 2012