Hi,

We've had more than one report of difficulties getting FormMail to work on Windows servers using IIS.

The most recent report causes the following message in the browser:
CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
This was with IIS 5 and PHP 4.4.2.

PHP was configured for the CGI/FastCGI API, which, experience has shown, is usually bad news.

We've located the actual point in FormMail's code that triggers the problem. It is this line:
PHP Code:
register_shutdown_function('OnExit'); 
Note, however, that writing a small script to test this did not cause the same error.

Our belief at this stage is that the problem is caused by the old version of PHP and the Windows/CGI API to PHP. At the time of this post (May 2007) the latest version 4 of PHP is 4.4.7.

We must emphasize that this problem is not caused by a bug or fault in FormMail. The same copy of FormMail will work fine on Linux servers, though we haven't specifically tested it on Linux with PHP 4.4.2.

It may, therefore, be a general bug in PHP 4.4.2 or a bug triggered by the CGI API used on Windows.