index.shtml
------------
<!--#exec cgi="/cgi-bin/log.pl"-->
log/pl
------------
sub writeCgiEntry {
my($logFile) = "log.txt";
my($script) = __FILE__;
my($name) = $ENV{'REMOTE_HOST'};
my($addr) = $ENV{'REMOTE_ADDR'};
my($browser) = $ENV{'HTTP_USER_AGENT'};
my($time) = time;
my($logFile) = "log.txt";
my($script) = __FILE__;
my($name) = $ENV{'REMOTE_HOST'};
my($addr) = $ENV{'REMOTE_ADDR'};
my($browser) = $ENV{'HTTP_USER_AGENT'};
my($time) = time;
open(LOGFILE,">>$logFile") or die("Can't open cgi log file. $!"); # it stops here
print LOGFILE ("$script\n");
close(LOGFILE);
}
print LOGFILE ("$script\n");
close(LOGFILE);
}
writeCgiEntry();
# do some CGI activity here.
print "Content-type: text/html\n\n";
print "<HTML>";
print "<TITLE>CGI Test</TITLE>";
print "<BODY><H1>Testing!</H1></BODY>";
print "</HTML>";
print "<HTML>";
print "<TITLE>CGI Test</TITLE>";
print "<BODY><H1>Testing!</H1></BODY>";
print "</HTML>";
I am on IIS5.0 NT 5.0(win2000) && activeperl the latest version.
Everytime I get to the "open(LOGFILE,">>....." part it always stops. I changed the open part but no matter what I use it stops at that line. When I take that part of the code out it works fine, I have the file/folder permitions to read write and execute. Any ideas anyone???
Get your FREE download of MSN Explorer at http://explorer.msn.com
_______________________________________________ Perl-Win32-Web mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
