The script would help.
I think this message means your script is not
formatting the page right. (I ain't CGI'd for a while)
Is it perl?
If so you can run the script at the command line
and even pass paremetrs (like you see in urls)
e.g:
Code:
./script var=fish > test.html
you can even try my skeleton cgi script if you like:
Code:
!/usr/bin/perl -w
use CGI qw( :standard );
my $comment = << "EOF";
# This template is for standalone cgi scripts that
# don't interact with shell scripts but simply run
# a command and print the output, including errors.
#
# A simple template CGI with one example form.
# (added just as an illustration)
# which can be removed, along with this comment.
#
# there is debugging code included too
# just comment it out when it's ready to release.
#
EOF
# ALL YOU NEED TO DO IS:
#
# change these to required values
# uncommenting the debug will remove the sample form and debug stuff
# the comment above will still be output though, so change it to
# something sensible!
# ===============================
my $title = "Skeleton CGI script for running a shell command";
my $command = "/usr/bin/date";
my $debug = 1;
# $debug = 0;
# don't touch these or put any output before them
# ===============================================
my $machine = $ENV{'SERVER_NAME'};
# COOKIE stuff
# ~~~~~~~~~~~~
# if param text exists, set the cookie to it
# else take the value of previous cookie (null if no previous)
# ============================================================
$cookie_name = 'skel_cookie';
$cookie_value = param('text') || cookie($cookie_name);
$cookie1 = cookie( -name=>$cookie_name,
-value=>$cookie_value,
-expires=>'+1y' );
###
print header( -cookie=>$cookie1 );
print start_html({ title=>"$title",
author=>"billy", }), h1($title);
# DEBUGGING
# =========
#
# If you are debugging CGIs you need to look at
# /var/apache/logs/error_log
#
# do a 'tail -f best idea
#use strict;
# debug, print params
# ===================
sub print_params
{
if (param()) {
print qq(<pre>);
foreach $param (param()) {
print "$param = " . param($param) . "\n" ;
}
print qq(</pre>);
}
if ( $string = cookie($cookie_name) ) {
print h4("cookie => " . $string);
}
print hr;
}
sub dump_env
{
print hr;
print "<pre>";
print "ENV\n";
foreach $key ( keys %ENV ) {
print p("$key $ENV{$key}");
print "$key=[$ENV{$key}]";
}
print "</pre>";
print hr;
}
sub run_command
{
my $command = "@_";
print p("Running $command [$machine]");
print hr;
print "<pre>";
open OUT, "2>&1 @_ |";
print p($_) while (<OUT>);
print "</pre>";
print hr;
}
sub sample_form {
print start_multipart_form;
print textfield( {-name=>'text', -value=>$cookie_value });
print submit( {-name=>'button', -value=>'OK'});
print end_form;
}