CHAPTER 11: Toolkit FastCGI Program




11.1 Introduction

The functionality provided by the FastCGI interface is very similar to that provided by CGI. Like CGI, FastCGI applications run in separate, isolated processes.

In contrast to CGI, FastCGI's processes are persistent - they are reused to handle multiple requests; after completing a request, they wait for a new request instead of terminating. This solves the CGI performance problem of creating new processes for each request. Invocation overhead with CGIinterface might be large (e.g., UNIX system call fork())

FastCGI interface is supported in most of Web servers, including the freely available Apache, as well as commercial servers from Microsoft and Netscape. In order to make FastCGI interface work with Empress Web HTML Toolkit, one needs to do the following:

  1. Use Web Server with FastCGI interface enabled.
  2. Add 'AddHandler fastcgi-script .fcgi' in the httpd.conf file
  3. Stop and restart your httpd server. As for the client side, nothing special is required. Instead of calling ehsql.cgi, the user now calls ehsqlf.fcgi. All the rules for using ehsql.cgi apply to ehsqlf.fcgi.