Wiley Trans-City Productions The Madfish Group

MySQL/PHP Database Applications, 2nd Edition


22 Nov 2004:
PHP 5 has been officially released for some time now. There are some changes that have been made since the book was published that may cause some of the examples to break (or seem to break - this is particularly true of the interaction of the new E_STRICT error level and the error-handling code included in the examples).

I've prepared a set of patch files that get the example code running under 5.0.2. (The XML-RPC bonus example is an exception to this at the moment.) These are not guaranteed to fix every possible incompatibility, but they deal with the main ones.

If you are interested in really catching all the changes, add these lines to the header.php file for any particular example:

define('DEBUG', E_ALL);
error_reporting(E_ALL | E_STRICT);

and be prepared to see a lot of complaints in the error log! (Sometimes, especially if the errors occur during the compliation of autoloaded class files, you won't always see the error results in your browser window as would normally be the case for the heavy debugging mode. So be sure to be watching your Apache error log file as well.)

The patch files are available here. You can also download a gzip'd tarball of the directory.

If you come across any additional fixes that you'd like to recommend to others, please let me know. Thanks.


BRAD BULGER is a lightly seasoned software developer who has worked for several companies that no longer exist and is now a member of The Madfish Group, where he builds Web sites for money. (PS - This is who "me" is above.)

JAY GREENSPAN is a New York-based writer, editor, and technical consultant. He is author of MySQL Weekend Crash Course and runs Trans-City Productions, Inc., a firm that provides editorial services to high-tech companies. (Jay wrote all of the good parts and is not responsible for this website or any of the parts that are wrong or broken.)