Here is the error what I get in my web server's error log.
[Tue Jan 15 11:18:07 2002] [error] [client 10.90.74.122] Premature end of
script headers: c:/program files/apache group/apache/cgi-bin/testapi.cgi
[Tue Jan 15 11:18:07 2002] [error] [client 10.90.74.122] [Tue Jan 15
11:18:07 2002] c:\PROGRA~1\APACHE~1\apache\cgi-bin\testapi.cgi: Error
executing run mode 'mode1'. Eval of code '$self->showapps' resulted in
error: Failed to open Sysmon DB at testapi.pm line 30.
line #30 in the testapi.pm is as below:
my $startloc="e:\it support services\db
architecture\sybase\sysmon-webdb";
The showapps sub is as below:
sub showapps {
my $self = shift;
# Get CGI query object
my $q = $self->query();
my $startloc="e:\it support services\db
architecture\sybase\sysmon-webdb";
opendir(SMD,"$startloc") || die "Failed to open Sysmon DB";
my @apps;
@apps = grep {$_ !~ m/^\.{1,2}$/} readdir(SMD);
closedir(SMD);
my $output = '';
$output .= $q->start_html(-title => 'Sysmon Database');
$output .= $q->start_form();
$output .= $q->popup_menu(-name=> 'apps', -values =>\@apps);
$output .= $q->hidden(-name => 'rm', -value => 'mode2');
$output .= $q->submit();
$output .= $q->end_form();
$output .= $q->end_html();
return $output;
}
if I execute the script from the command line, it never gives me this error
and executes fine.
C:\Program Files\Apache Group\Apache\cgi-bin>perl testapi.cgi
Content-Type: text/html; charset=ISO-8859-1
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US"><head><title>Sysmon
Database</title>
</head><body><form method="post" action="/testapi.cgi" >
<select name="apps">
<option value="Landscape">Landscape</option>
<option value="Phhorce">Phhorce</option>
</select>
<input type="hidden" name="rm" value="mode2" /><input type="submit"
name=".submit" />
</form></body></html>
C:\Program Files\Apache Group\Apache\cgi-bin>
Any ideas as what could be wrong??
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]