Changeset 14235


Ignore:
Timestamp:
2007-07-09T13:40:53+12:00 (17 years ago)
Author:
mdewsnip
Message:

Added an iis6_mode variable and new code for working around IIS 6 craziness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/cgi-bin/gliserver.pl

    r14218 r14235  
    33
    44
    5 use gsdlCGI;
    65use strict;
     6
     7
     8# Set this to 1 to work around IIS 6 craziness
     9my $iis6_mode = 0;
     10
     11
     12# IIS 6: for some reason, IIS runs this script with the working directory set to the Greenstone
     13#   directory rather than the cgi-bin directory, causing lots of stuff to fail
     14if ($iis6_mode)
     15{
     16    # Change into cgi-bin directory
     17    chdir("cgi-bin");
     18}
     19
     20
     21# We use require and an eval here (instead of "use") to catch any errors loading the module (for IIS)
     22eval("require \"gsdlCGI.pm\"");
     23if ($@)
     24{
     25    print STDOUT "Content-type:text/plain\n\n";
     26    print STDOUT "ERROR: $@\n";
     27    exit 0;
     28}
    729
    830
Note: See TracChangeset for help on using the changeset viewer.