WebSnap Session Management For CGI

By: Bob Swart

Abstract: This article by Bob Swart explains how to get login and sessions to work for WebSnap CGI applications (and WebSnap applications written in Kylix 2)

This article, written by Bob Swart and originally published in the March 2002 issue of The Delphi Magazine, has been made available as free sample at http://www.TheDelphiMagazine.com/Samples/1391/1391.htm.

In this article, I'll explain that WebSnap session management using the TSessionsService component will not work for every possible target (not without using the alternate TCookieSessionsService). Specifically, youll find it wont work at all for CGI applications nor any Kylix web server application on Linux. In this article, Ill explain what the problem is, what to do about it, and how I solved it for my own situation using WebSnap CGI web server applications written in Delphi 6 Enterprise as well as Kylix 2 Enterprise.
The article also covers a number of deployment issues (specifically on Linux).

Apart from reading the article, you can try the Delphi 6 implementation of the article at http://www.eBob42.com/cgi-bin/eBob42.exe, or the Kylix 2 implementation at http://www.drbob42.co.uk/cgi-bin/eBob42 (in both cases login as guest with password guest). Note that these are CGI executables, and still work with full support for login and sessions!

Server Response from: ETNASC03