Index: /greenstone3/trunk/web/WEB-INF/cgi/gliserver.pl
===================================================================
--- /greenstone3/trunk/web/WEB-INF/cgi/gliserver.pl	(revision 16460)
+++ /greenstone3/trunk/web/WEB-INF/cgi/gliserver.pl	(revision 16461)
@@ -377,12 +377,9 @@
     $installation_status .= "JAVA_HOME: " . $ENV{'JAVA_HOME'} . "\n" if defined($ENV{'JAVA_HOME'}); # on GS2, Java's only on the PATH
     $installation_status .= "PATH: " . $ENV{'PATH'} . "\n";
-    $installation_status .= "FEDORA_HOME: ".$ENV{'FEDORA_HOME'} if defined($ENV{'FEDORA_HOME'});
+    if(defined $ENV{'FEDORA_VERSION'}) { # not using FLI unless version set
+	$installation_status .= "FEDORA_HOME: ".$ENV{'FEDORA_HOME'} . "\n";
+	$installation_status .= "FEDORA_VERSION: ".$ENV{'FEDORA_VERSION'};
+    }
     
-    if (defined $ENV{'FEDORA2_HOME'}) {
-	$installation_status .= "\nFEDORA2_HOME: ".$ENV{'FEDORA2_HOME'}."\n";
-    } elsif (defined $ENV{'FEDORA3_HOME'}) {
-	$installation_status .= "\nFEDORA3_HOME: ".$ENV{'FEDORA3_HOME'}."\n";
-    }
-
     if ($installation_ok) { ## M. Dewsnip's svn log comment stated that for iis6_mode output needs to go to STDOUT
 	if($iis6_mode && $gsdl_cgi->greenstone_version() == 2) {
Index: /greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI.pm
===================================================================
--- /greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI.pm	(revision 16460)
+++ /greenstone3/trunk/web/WEB-INF/cgi/gsdlCGI.pm	(revision 16461)
@@ -367,34 +367,37 @@
     my ($optional) = @_;
 
-    # The following will still allow the ENV FEDORA_HOME variables to have been set outside 
-    # the gsdlsite.cfg file. Existing env vars are only overwritten if they've *also* been
-    # defined in gsdlsite.cfg.
-    if(!defined $self->{'fedora_home'} && !defined $self->{'fedora_version'}) 
+    # The following will still allow the FEDORA_HOME and FEDORA_VERSION environment 
+    # variables to have been set outside the gsdlsite.cfg file. Existing env vars 
+    # are only overwritten if they've *also* been defined in gsdlsite.cfg.
+
+    if (!defined $self->{'fedora_home'}) # Don't need to go through it all again if we'd already done this before
     {
-	# Can look for any fedorahome properties defined in the gsdlsite.cfg file
+	# First look in the gsdlsite.cfg file for the fedora properties to be defined
+	# and set $ENV{FEDORA_HOME} and $ENV{FEDORA_VERSION} if values were provided
 	$self->{'fedora_home'} = $self->get_config_info("fedorahome", $optional);
-	$self->{'fedora_version'} = $self->get_config_info("fedoraversion", $optional);
 	
-	if(defined $self->{'fedora_home'} && defined $self->{'fedora_version'}) 
-	{
-	    # need to set $ENV{FEDORA2_HOME} or $ENV{FEDORA3_HOME} *and* $ENV{FEDORA_HOME}
-	    my $env_name = "FEDORA".$self->{'fedora_version'}."_HOME";
-	    $ENV{$env_name} = $self->{'fedora_home'};
+	if (defined $self->{'fedora_home'}) {
 	    $ENV{'FEDORA_HOME'} = $self->{'fedora_home'}; 
 	} 
-
-	# if none were specified in the file, use the ENV vars if FEDORA_HOME is already set there
-	elsif(defined $ENV{'FEDORA_HOME'}) 
-	{ 
+	elsif (defined $ENV{'FEDORA_HOME'}) { # check environment variable
 	    $self->{'fedora_home'} = $ENV{'FEDORA_HOME'};
-	    if(defined $ENV{'FEDORA2_HOME'} && ($ENV{'FEDORA_HOME'} eq $ENV{'FEDORA2_HOME'})) 
-	    {
-		$self->{'fedora_version'} = 2;
+	}
+	
+	# if FEDORA_HOME is now defined, we can look for the fedora version that is being used
+	if (defined $ENV{'FEDORA_HOME'}) 
+	{
+	    # first look in the file
+	    $self->{'fedora_version'} = $self->get_config_info("fedoraversion", $optional);
+
+	    if (defined $self->{'fedora_version'}) {
+		$ENV{'FEDORA_VERSION'} = $self->{'fedora_version'};
 	    } 
-	    else # try defaulting to Fedora 3
-	    { 
-		print STDERR "Setting FEDORA3_HOME env variable to FEDORA_HOME (".$ENV{'FEDORA_HOME'}.").\n";
-		$self->{'fedora_version'} = 3; 
-		$ENV{'FEDORA3_HOME'} = $ENV{'FEDORA_HOME'};
+	    elsif (defined $ENV{'FEDORA_VERSION'}) { # then check environment variable
+		$self->{'fedora_version'} = $ENV{'FEDORA_VERSION'};
+	    } 
+	    else { # finally, default to version 3 and warn the user
+		$ENV{'FEDORA_VERSION'} = "3";
+		$self->{'fedora_version'} = $ENV{'FEDORA_VERSION'};
+		#$self->generate_ok_message("FEDORA_HOME is set, but not FEDORA_VERSION, defaulted to: 3.");
 	    }
 	}
