Ignore:
Timestamp:
2019-04-12T19:36:30+12:00 (5 years ago)
Author:
ak19
Message:

On Ubuntu 18.04, confirmed Renate's findings that gsdlCGI.pm wasn't found by gliserver.pl in its @INC paths. Have now added the containing cgi-bin folder on GS2 and cgi folder on GS3 to @INC to teach gliserver.pl to find gsdlCGI.pm. This however needed a fix in build.xml where force-start-tomcat was passing the wrong value for GSDL3HOME to tomcat: it was passing in basedir instead of web.home. With this fix, gliserver.pl now works on Ubuntu 18.04. Have added lines identical to the changes in gliserver.pl to the other pl files in the cgi(-bin) folder for those pl files that similarly import gsdlCGI.pm.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/cgi-bin/gliserver.pl

    r32921 r33011  
    1414    if defined &Win32::SetChildShowWindow;
    1515
     16    # On Ubuntu 18.04, gsdlCGI.pm can't be found as the cgi folder is not among @INC paths.
     17    # Ensure gsdlCGI.pm is available in @INC by adding the cgi folder to it.
     18    # For GS2:
     19    my $gsdl_cgi_path = $ENV{'GSDLHOME'} . "/cgi-bin";
     20    # For GS3:
     21    $gsdl_cgi_path = $ENV{'GSDL3HOME'} . "/WEB-INF" . "/cgi" if defined $ENV{'GSDL3HOME'};
     22
     23    my $found_cgi_path = 0;
     24    foreach my $inc_path (@INC) {
     25        if($inc_path eq $gsdl_cgi_path) {
     26                $found_cgi_path = 1;
     27                last;
     28        }
     29    }
     30    if(!$found_cgi_path) {
     31      unshift (@INC, $gsdl_cgi_path);
     32    }
    1633}
    1734
Note: See TracChangeset for help on using the changeset viewer.