Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 2.5

REVIEW

acgi dispatcher

Issue: 2.5 (May/June 2004)
Author: Toby Rush
Article Description: No description available.
Article Length (in bytes): 3,496
Starting Page Number: 9
Article Number: 2505
Related Web Link(s):

http://www.sentman.com/acgi

Full text of article...

REALbasic's capability to send and receive Apple Events has always made it an ideal tool for creating CGI programs -- programs that run alongside a web server and act on data submitted via a web page form -- on Macintosh-based web servers.

Virtually every web server designed for Mac OS 9 always subscribed to the standard method of dealing with incoming form data: send the form data in an Apple Event to the program specified in the >FORM< tag of the web page. The CGI program is generally expected to reply with a web page to be displayed; this is done simply by sending the HTML code as a reply to the Apple Event.

Of course, all this changed with Mac OS X. Few will argue that Apache, the robust and powerful web server that ships with every copy of Mac OS X, is a huge improvement over the OS 9 web server programs. Since Apache was designed for UNIX systems, however, it does not subscribe to the standard method of sending CGI information via Apple Events.

James Sentman solved this problem by releasing acgi dispatcher. acgi dispatcher works alongside Apache to translate incoming CGI data into Apple Events and then sending the events according to the standard Mac OS 9 model. In most cases, this means that CGI programs written for Mac OS 9 can simply be recompiled for Mac OS X and immediately put into use!

acgi dispatcher is fairly easy to install; the program itself resides in the "CGI-Executables" directory in your Web Server folder. Adding the program to your Startup Items folder makes it available each time your computer starts up.

acgi dispatcher also comes with several demonstration CGI programs, the most impressive of which is a way to control iTunes remotely through a web interface. The program also adds some nice features to the traditional Mac CGI model, including pre-decoded URLs and form elements already separated into AppleScript lists.

The only real drawback to acgi dispatcher is one that all similar OS X utilities are faced with: setting things up so that the utility runs even when no one is logged in. With acgi dispatcher doing this is possible, but it's not 100% reliable, and it's probably a better idea to make sure the station is always logged in.

For those who are faced with the need to use Mac OS 9 CGI programs on an OS X server though, acgi dispatcher isn't just the best choice, it's the only choice, and it does the job quite well.

End of article.