Update: 4D 2004

4th Dimension 2004 introduces a handful of changes into the Web server and updates most plug-ins. If you convert the WebCore database to 4D 2004, update the 4D Internet Commands as well. You can find the current version at http://www.4d.com/products/downloads_4d.html

4th Dimension 2004 changes how unknown URLs are formatted in the On Web Authentication and On Web Connection database methods. In 4th Dimension 2003 and earlier, uknown URLs are reported without a leading slash. In 4th Dimension 2004, unkonwn URLs are reported with a leading slash for consistency with how 4DACTION, 4DCGI, and 4DMETHOD URLs are formatted. This change in behavior breaks some of the methods in the WebCore database. The simplest workaround to this problem is to turn on the following preference:

Preferences > Compatibility > Web Compatibility > Remove "/" on unknown URLs.

Update: OS X

4th Dimension 6.8 and later can run natively under the OS X operating system. OS X blocks users other than root from running servers on ports below 1024. Translation: You can't run the Web server on port 80 (the usual port) unless you're root. Of the several workarounds for this constraint, the one I recommend is adding a rule to the OS X firewall that forwards requests to port 80 on to a different port. There is little or no speed penalty to this approach, configuring 4th Dimension is simple, and there is no need to run the Web server as root. Below are the basic steps:

  1. Configure 4th Dimension to use a high-numbered port for the Web server, such as port 8000.
  2. Add a rule to the built-in firewall, like this one:
    fwd 127.0.0.1,8000 tcp from any to any 80 in

Below is a translation of the cryptic looking rule shown above:
forward (fwd) requests to the this machine (127.0.0.1), on the port 4D is using for the Web server (8000) over TCP (tcp) coming from anyplace (from any) or to anyplace (to any) on the regular Web port (80).

There are two free products available that make it easy to set and modify IPFW rules, listed below.

Simple Port Forwarder
This graphical tool lets you view and modify ipfw rules. This tool also enables you to save the rule changes to automatically reload with the server is restarted.
Product page.
Direct download link.
 
EVX_IPFW
This small plug-in lets you change ipfw rules on-the-fly from 4D. This is ideal when you're distributing a project and do not want users to run Simple Port Forwarder.
Product page.
Download link (form).

Update: 4D 2003

4th Dimension 2003 introduces a handful of changes into the Web server and updates most plug-ins. If you convert the WebCore database to 4D 2003, update the 4D Internet Commands as well. You can find the current version at http://www.4d.com/products/downloads_4d.html

Errata

This section lists errata found in The 4D Web Companion. Also see the demonstration download page for updates and fixes to the demos. If you discover any new errors or problems in the book, please email them to dpadams@island-data.com

WebScriptIncludeFile Parameter Name (Pages 189, 190 and 191)
The examples on these pages pass the document path to WebScriptIncludeFile in a parameter named path. This is the incorrect parameter name. The document path should be passed in a parameter named name. as in this example:
 
<!--4dscript/WebScriptIncludeFile/name=pages/recent/news.text-->
 
Thanks to Darwin Caverly for reporting this problem.
Added on August 28, 2001
 
4D Pack and Image Formats (Pages 265-266)
These pages state or imply that the 4D Pack plug-in suite can convert 4D PICT images to a variety of formats, including JPEG. This is incorrect. 4D Pack can convert images to GIF and BMP. There is no native way to convert images to JPEG without QuickTime.
Added on July 31, 2001
 
SMTP_QuickSend (Page 422)
The SMTP_QuickSend example is missing the From parameter. The correct code appears here:
 
$errorCode_l:=SMTP_QuickSend(Mail_host_name;From;To;Subject;Body)
 
Thanks to Jason Morse for reporting this problem.
Added on January 7, 2002