View Full Version : Bad header?


Jonathan
04-29-2004, 01:55 AM
I am getting this error:

malformed header from script. Bad header=/home/place/public_html/cgi-: /home/place/public_html/cgi-bin/messenger/messenger.cgi
Can't locate HTML/Scrubber.pm in @INC (@INC contains: /home/place/public_html/cgi-bin/messenger/messenger.cgi /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at messenger.cgi line 80.

Ideas?

Jafo
04-29-2004, 02:13 PM
This usually means you did not upload the modules correctly.

Did you modify the $the_main_path by chance in messenger.cgi?

Jonathan
05-01-2004, 10:17 PM
Now I am getting this:

[Sat May 1 21:14:22 2004] [error] [client] File does not exist: /home/freedom/public_html/500.shtml
[Sat May 1 21:14:22 2004] [error] [client] malformed header from script. Bad header=/home/freedom/public_html/cgi-: /home/freedom/public_html/cgi-bin/messenger/messenger.cgi
Can't locate HTML/Scrubber.pm in @INC (@INC contains: /home/freedom/public_html/cgi-bin/messenger /usr/lib/perl5/5.8.1/i686-linux /usr/lib/perl5/5.8.1 /usr/lib/perl5/site_perl/5.8.1/i686-linux /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at messenger.cgi line 80.

and this is what the messenger.cgi configs look like:

BEGIN {
$0 =~ m~(.*)(\\|/)~;
$the_main_path = $1;
$the_main_path =~ s~\\~/~g;
if ($the_main_path eq "") {
$the_main_path = $ENV{'SCRIPT_FILENAME'};
$the_main_path =~ s/\/messenger.cgi//g;
print $the_main_path;
}
## If all else fails then define and uncomment the next line (No trailing slash!);
#$the_main_path = "/home/freedom/public_html/cgi-bin/messenger";
$SIG{__WARN__} = sub { $warn_error++; }
}

Jafo
05-01-2004, 10:20 PM
Did you upload the HTML folder?

Jafo
05-01-2004, 10:21 PM
Also, you did not uncomment this line:

#$the_main_path = "/home/freedom/public_html/cgi-bin/messenger";

Should look like:

$the_main_path = "/home/freedom/public_html/cgi-bin/messenger";

Jonathan
05-02-2004, 12:27 AM
I have the module/ folder contents uploaded to the cgi-bin/messenger/ directory as well as cgi-bin/messenger/modules/ just until I get it working... I have tried removing it so it looks like:

BEGIN {
$0 =~ m~(.*)(\\|/)~;
$the_main_path = $1;
$the_main_path =~ s~\\~/~g;
if ($the_main_path eq "") {
$the_main_path = $ENV{'SCRIPT_FILENAME'};
$the_main_path =~ s/\/messenger.cgi//g;
print $the_main_path;
}
## If all else fails then define and uncomment the next line (No trailing slash!);
$the_main_path = "/home/freedom/public_html/cgi-bin/messenger";
$SIG{__WARN__} = sub { $warn_error++; }
}

use lib $the_main_path;
#use Time::HiRes qw(gettimeofday tv_interval);
#$start_time = [ gettimeofday ];
require 'functions.cgi';
require 'calendar.cgi';
use CGI qw/:standard :escapeHTML/;
use CGI::Cookie;
use Net::POP3;
use MIME::Parser;
use MIME::Head;
use MIME::Entity;
use Net::SMTP;
use Mail::Address;
use URI::Escape;
use HTML::Scrubber;
#use LWP::UserAgent;

Jafo
05-02-2004, 03:43 PM
You should upload the entire HTML directory to the messenger directory, not the contents.

In other words, create a folder called HTML (capital letters) in the messenger directory, and upload the HTML folder contents to it.