version 1.1, 2002/02/18 20:59:36
|
version 1.3, 2002/09/09 14:18:56
|
Line 6
|
Line 6
|
|
|
$|=1; |
$|=1; |
|
|
|
use lib '/home/httpd/lib/perl/'; |
|
use LONCAPA::Configuration; |
|
|
use IO::File; |
use IO::File; |
use IO::Socket; |
use IO::Socket; |
|
|
Line 25 sub reply {
|
Line 28 sub reply {
|
} |
} |
|
|
|
|
# ------------------------------------------------------------ Read access.conf |
# --------------------- Read loncapa.conf (and by default loncapa_apache.conf). |
{ |
my $perlvarref=LONCAPA::Configuration::read_conf('loncapa.conf'); |
my $config=IO::File->new("/etc/httpd/conf/access.conf"); |
my %perlvar=%{$perlvarref}; |
|
undef $perlvarref; # remove since sensitive and not needed |
while (my $configline=<$config>) { |
delete $perlvar{'lonReceipt'}; # remove since sensitive and not needed |
if ($configline =~ /PerlSetVar/) { |
delete $perlvar{'lonSqlAccess'}; # remove since sensitive and not needed |
my ($dummy,$varname,$varvalue)=split(/\s+/,$configline); |
|
$perlvar{$varname}=$varvalue; |
|
} |
|
} |
|
delete $perlvar{'lonReceipt'}; # remove since sensitive and not needed |
|
delete $perlvar{'lonSqlAccess'}; # remove since sensitive and not needed |
|
} |
|
|
|
$testhost=$ENV{'QUERY_STRING'}; |
$testhost=$ENV{'QUERY_STRING'}; |
$testhost=~s/\W//g; |
$testhost=~s/\W//g; |