When checking my server logs I am receiving an error "502 - Bad Gateway" whenever the online.cgi file is referenced. My server is Win 2003 Enterprise Edition with IIS.
The online.cgi script is as follows ...
#!/usr/bin/perl
# load modules
use strict;
BEGIN {
($0 =~ m!(.*)(\|/)[^/\]+!) && unshift(@INC, $1, "$1$2Modules");
$| = 1;
};
use lib("./Modules", ".");
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);
use vars qw(%vars_config %vars_pntf);
require "vars_config.cgi";
require "$vars_config{VariablesPath}/vars_pntf.cgi";
print qq~Content-type: text/html\n\n
var AllImgs = document.body.getElementsByTagName("img");
function ChangeAll(img) {
for(var i=0; i <= AllImgs.length; i++) {
if(AllImgs[i] && AllImgs[i].id == img) {
AllImgs[i].src = '$vars_config{NonCGIURL}/user_online.gif';
AllImgs[i].alt = 'Online';
AllImgs[i].title = 'Online';
} // end if
} // end for
}
~;
if($vars_pntf{Enabled} eq "yes" && -e "$vars_config{CachePath}/pntf/now.cgi") {
do "$vars_config{CachePath}/pntf/now.cgi";
my $load = UBB::PNTF::_load();
foreach my $uniq (keys %{ $load->{uniq}->{logins} }) {
my $user = $load->{uniq}->{logins}->{$uniq}->[0];
# check to see if actual user or if hidden
next if $user eq '' || $load->{uniq}->{logins}->{$uniq}->[2] eq 1;
print qq~ChangeAll('online$user');\n~;
} # end if
} # end if
exit(0);
1;