Upgrade Note for First Edition Readers
If you have the first edition of MySQL Cookbook, be warned that the PHP library files in the second edition have the same names as in the first edition, but are incompatible with them. If you are using any PHP scripts that depend on the first edition library files, they will break if you install the second edition library files on top of them. To prevent this from happening, use the following procedure:
Change location into the directory where you installed the first edition library files and make a copy of each one:
%
cp Cookbook.php Cookbook1.php%cp Cookbook_Utils.php Cookbook_Utils1.php%cp Cookbook_Webutils.php Cookbook_Webutils1.php%cp Cookbook_Session.php Cookbook_Session1.phpFind all PHP scripts that include the first edition library files, and change them to include the *1.php files instead. For example, a script that includes Cookbook_Utils.php should be changed to include Cookbook_Utils1.php. (Some of the library files themselves include other library files, so you’ll also need to edit the *1.php files.)
Test the modified scripts to make sure that they work correctly with the *1.php files.
Now you can install the second edition library files on top of the first edition files that have the same names. PHP scripts from the second edition will use these new library files, and old scripts should continue to work correctly.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access