NOTE 1: If you are using this book, at the very least go to the respective web sites for PHP, MySQL and Apache to download the latest versions of the software, although you'll still have a heck of a time doing anything with them, based on this book, because it is so very old.
NOTE 2: If you upgraded to PHP 4, and use <?php_track_vars?>, you will get an error about <?php_track_vars?> no longer being supported. No worries. Just delete <?php_track_vars?> from the top of the script, and verify in your php.ini that the following are true: track_vars = on and register_globals = on. They're on by default, so unless you explictly turn them off, you shouldn't have to worry about your variables not being accessible.
Chapter 1: Getting Started with PHP
- On page 16, the reference to "php-install-dir" should be "php_install_dir" (underscores).
- On page 16, you're told to change the value of doc_root to point to the document root of your Web server. With Xitami, leave this entry blank if you're having problems.
Chapter 2: Basic PHP Techniques
- In the section "Displaying Browser Specific Code" starting on page 55, be aware that the Windows version of PHP3 sometimes did not come with PCRE functions built in. If you cannot find the PCRE dll, which you could load by uncommenting the appropriate line in your php3.ini file, please think about upgrading to PHP4, where the functions are built-in.
- In Figure 2.5 on page 60, the filename of the URL in the Location bar of the graphic should have an extension of .html, not .php.
- At the top of page 62, the closing Heading 1 HTML tag should be </H1>, not </J1>.
Chapter 4: Creating and Populating Database Tables
- In the "create connection" chunk of code at the top of page 118, the die() statement should read:
die("Couldn't connect to server."); - In the table at the bottom of page 119, the field names should be lower-cased to match what you'll be typing in the form shown on page 120. Similarly, the table heading "FIELD SIZE" should read "FIELD LENGTH" in order to match the form you created.
- In the "create connection" chunk of code on page 129, the die() statement should read:
die("Couldn't connect to server.");
Chapter 5: User Authentication
- In the example of the Apache .htaccess file at the top of page 137, the "require" line should read:
require group friends
- In the limitbyIP_range.php file on page 146, the echo statements are essentially reversed. If the first condition is true, the user is a good user, and if the second statement is instead true, the user is "not in my neighborhood....".
Chapter 6: User Tracking and Session Management
- On page 153, the SQL statement in the code block should read:
$sql = "select sum(item_qty) from db_table where id='$id'";
Chapter 7: Advanced PHP Techniques: Web-based Database Administration
- In Figure 7.2 on page 168, the filename of the URL in the Location bar of the graphic should have an extension of .php, not .php3.
- In Figure 7.3 on page 169, the filename of the URL in the Location bar of the graphic should have an extension of .php, not .php3.
Chapter 8: Advanced PHP Techniques: e-Commerce
- In the example code on page 224, the last three lines of the example script should read:
</FORM> </BODY> </HTML>
- In the example code on page 231, the last three lines of the example script should read:
</FORM> </BODY> </HTML>
- In the example code on page 260, at the very top, the link should be to a file called shop_checkout.php (not *.php3), in two places.
- In the example code on page 261, at the very bottom, the link should be to a file called shop_checkout.php (not *.php3).
- In the example code on page 281, the </FORM> tag is unnecessary.
Appendix A: Essential PHP Language Reference
- On page 296, the first line of the example for the while construct should read:
$a = 0; // set a starting point
- On page 330, in the mail() function description, it says "...or an SNMP gateway". This should read "...or an SMTP gateway".
[last updated 2003-09-03]
