diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt
index 6ce539c3e..02c747400 100644
--- a/docs/changelog/6.x.x.txt
+++ b/docs/changelog/6.x.x.txt
@@ -77,6 +77,7 @@
original.page.url that will allow you to link to the original content from
the shortcut.
- bugfix [ 1016271 ]. all posts go to last forum in MB (Leendert Bottelberghs).
+ - Added FastCGI support. (Kevin Wilson)
6.1.1
diff --git a/docs/upgrades/upgrade_6.1.1-6.2.0.sql b/docs/upgrades/upgrade_6.1.1-6.2.0.sql
index 96df180db..2d9038d06 100644
--- a/docs/upgrades/upgrade_6.1.1-6.2.0.sql
+++ b/docs/upgrades/upgrade_6.1.1-6.2.0.sql
@@ -274,7 +274,7 @@ alter table forum add postPreviewTemplateId varchar(22) NULL after postformTempl
alter table forum add usePreview int(11) NOT NULL default 1;
INSERT INTO template VALUES (1,'Default Post Preview','
\n\n
\n\n
\n
\n
\n\n
\n
\n
\n\n\n\n\n','Forum/PostPreview',1,1);
UPDATE userProfileField SET dataValues = '{\r\n6=>WebGUI::International::get(\'HTMLArea 3\'),\r\n1=>WebGUI::International::get(495), #htmlArea\r\n#2=>WebGUI::International::get(494), #editOnPro2\r\n3=>WebGUI::International::get(887), #midas\r\n4=>WebGUI::International::get(879), #classic\r\n5=>WebGUI::International::get(880),\r\nnone=>WebGUI::International::get(881)\r\n}' WHERE fieldName = 'richEditor';
-INSERT INTO template VALUES ('6','HTMLArea 3 (Mozilla / IE)',' \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n ','richEditor',1,1);
+INSERT INTO template VALUES ('6','HTMLArea 3 (Mozilla / IE)',' \r\n\r\n \r\n\r\n \r\n \r\n \r\n \r\n\r\n ','richEditor',1,1);
alter table page add encryptPage int(11) default 0;
alter table USS_submission add startDate int(11) default 946710000;
alter table USS_submission add endDate int(11) default 2114406000;
diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm
index e57864792..2b8792015 100644
--- a/lib/WebGUI.pm
+++ b/lib/WebGUI.pm
@@ -112,7 +112,8 @@ sub page {
my $configFile = shift;
my $useExistingSession = shift; # used for static page generation functions where you may generate more than one page at a time.
my $pageUrl = shift;
- WebGUI::Session::open($webguiRoot,$configFile) unless ($useExistingSession);
+ my $fastcgi = shift;
+ WebGUI::Session::open($webguiRoot,$configFile,$fastcgi) unless ($useExistingSession);
# JT: don't forget to do something with action 2
my $page = _getPageInfo($pageUrl);
diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm
index 9f493ecef..9ef864e44 100644
--- a/lib/WebGUI/Session.pm
+++ b/lib/WebGUI/Session.pm
@@ -285,7 +285,7 @@ sub getScratch {
#-------------------------------------------------------------------
-=head2 open ( webguiRoot [ , configFile ] )
+=head2 open ( webguiRoot, configFile [ , fastcgi ] )
Opens a closed ( or new ) WebGUI session.
@@ -299,6 +299,10 @@ The path to the WebGUI files.
The filename of the config file that WebGUI should operate from.
+=item fastcgi
+
+A pointer to a Fast CGI object.
+
=back
=cut
@@ -306,6 +310,7 @@ The filename of the config file that WebGUI should operate from.
sub open {
my $webguiRoot = shift;
my $configFile = shift;
+ my $fastcgi = shift;
my ($key);
###----------------------------
### operating system specific things
@@ -338,7 +343,7 @@ sub open {
###----------------------------
### CGI object
$CGI::POST_MAX=1024 * $session{setting}{maxAttachmentSize};
- $session{cgi} = CGI->new();
+ $session{cgi} = $fastcgi || CGI->new();
if ($session{cgi}->cgi_error =~ /^413/) {
$session{http}{status} = $session{cgi}->cgi_error;
WebGUI::ErrorHandler::warn("File upload too big. May need to adjust Max File Size setting.");
diff --git a/www/index.fpl b/www/index.fpl
new file mode 100755
index 000000000..4ab3ac62d
--- /dev/null
+++ b/www/index.fpl
@@ -0,0 +1,33 @@
+#!/usr/bin/perl
+
+#-------------------------------------------------------------------
+# WebGUI is Copyright 2001-2004 Plain Black LLC.
+#-------------------------------------------------------------------
+# Please read the legal notices (docs/legal.txt) and the license
+# (docs/license.txt) that came with this distribution before using
+# this software.
+#-------------------------------------------------------------------
+# http://www.plainblack.com info@plainblack.com
+#-------------------------------------------------------------------
+
+
+# NOTE: This gateway script is to be used with FastCGI.
+
+our ($webguiRoot, $configFile);
+
+BEGIN {
+ $configFile = "WebGUI.conf";
+ $webguiRoot = "/data/WebGUI";
+ unshift (@INC, $webguiRoot."/lib");
+}
+
+#-----------------DO NOT MODIFY BELOW THIS LINE--------------------
+
+use CGI::Carp qw(fatalsToBrowser);
+use strict;
+use WebGUI;
+use CGI::Fast;
+while my $fcgi = new CGI::Fast) {
+ print WebGUI::page($webguiRoot,$configFile,"","",$fcgi);
+}
+