diff --git a/WebminCore.pm b/WebminCore.pm index 01e1698ca..88fba6e8c 100644 --- a/WebminCore.pm +++ b/WebminCore.pm @@ -13,7 +13,7 @@ Full function documentation is in web-lib-funcs.pl. =cut package WebminCore; -use lib ("$ENV{'PERLLIB'}/vendor_perl"); +use lib ("$ENV{'LIBROOT'}/vendor_perl"); require Exporter; @ISA = qw(Exporter); diff --git a/miniserv.pl b/miniserv.pl index 4008e9206..ecfffbba2 100755 --- a/miniserv.pl +++ b/miniserv.pl @@ -27,6 +27,7 @@ else { $config_file = "$pwd/$ARGV[0]"; } %config = &read_config_file($config_file); +$ENV{'LIBROOT'} = $config{'root'}; if ($config{'perllib'}) { push(@INC, split(/:/, $config{'perllib'})); push(@INC, "$config{'root'}/vendor_perl"); @@ -2395,6 +2396,7 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) { $envlang = $ENV{"LANG"}; $envroot = $ENV{"SystemRoot"}; $envperllib = $ENV{'PERLLIB'}; + $envdoclroot = $ENV{'LIBROOT'}; foreach my $k (keys %ENV) { delete($ENV{$k}); } @@ -2403,6 +2405,7 @@ if (&get_type($full) eq "internal/cgi" && $validated != 4) { $ENV{"USER"} = $envuser if ($envuser); $ENV{"OLD_LANG"} = $envlang if ($envlang); $ENV{"SystemRoot"} = $envroot if ($envroot); + $ENV{'LIBROOT'} = $envdoclroot if ($envdoclroot); $ENV{'PERLLIB'} = $envperllib if ($envperllib); $ENV{"HOME"} = $user_homedir; $ENV{"SERVER_SOFTWARE"} = $config{"server"};