in reply to Perl CGI Apache help...
The test.cgi is simpler than the login one that I was initially trying to get to work. The code for it is as follows:[Wed Jun 18 18:07:45 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:07:43 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:06:34 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:04:27 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:04:26 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:01:53 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 18:00:23 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml [Wed Jun 18 17:58:17 2008] [error] [client 76.193.171.114] File does n +ot exist: /home/hopefulc/public_html/500.shtml
If anyone knows what could or might be causing this, it would be greatly appreciated...#!/usr/bin/perl -wT use CGI qw(:standard); use CGI::Carp qw(warningsToBrowser fatalsToBrowser); use strict; my ( $dir, #path to directory $dir_file, #sample file in the directory @files, #array of all the files in the directory @lines #array of all the lines in the sample file ); $dir = "/home/hopefulc/public_html/cgi-bin/"; $dir_file = "/home/hopefulc/public_html/cgi-bin/koh_members_list.cgi"; opendir(DIR, $dir) || die("Failed To Open Directory"); @files = readdir(DIR); close(DIR); print header; print start_html("Test CGI"); print "<u><h3>The files in the directory are listed below:</h3></u>\n< +br><br>\n"; foreach my $file (@files) { print "$file\n<br>\n"; } print "<u><h3>The lines in the file are listed below:</h3></u>\n<br><b +r>\n"; open (FILE, $dir_file) || die("Failed To Open File"); @lines = <FILE>; close(FILE); foreach my $line (@lines) { print "$line\n<br>\n"; } print end_html;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl CGI Apache help...
by Anonymous Monk on Jun 19, 2008 at 04:27 UTC |