Welcome to Webhost4life Forum Sign in | Join | Faq

PERL

Started by cincywedding at 09-01-2005 1:07 PM. Topic has 2 replies.

Print Search
Sort Posts:    
   09-01-2005, 1:07 PM
cincywedding is not online. Last active: 9/2/2005 3:53:53 AM cincywedding

Top 150 Posts
Joined on 09-02-2005
Posts 2
CGI application misbehaved by not returned complete set of HTTP headers
Reply Quote

I've just moved from a unix envirnoment and have been trying to redo my perl scripts... one of the scripts I was using, Upload lite, says it is compatible with windows, but I keep getting the following error:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers.

I've tried it with the perl path ( #!c:/perl/bin ) and without, since it says you don't need that.. and I get the same results.  I've made sure my directory and files have at least R W X permissions.

I've tried it with a redirection page and without... all get same error.  Any ideas how to resolve this?  Here is the code portion that I configure.. the rest you aren't supposed to touch:

# START USER EDITS

# absolute path to folder files will be uploaded to.

# WINDOWS users, your path would like something like : images\\uploads

# UNIX users, your path would like something like : /home/www/images/uploads

# do not end the path with any slashes and if you're on a UNIX serv, make sure

# you CHMOD each folder in the path to 777

$dir = "c:\\hosting\\webhost4life\\member\\mwalson\\cgi\\files";

#$dir = "d:\\html\\users\\html\\images";

# absolute URL to folder files will be uploaded to

$folder = "http://www.cincywedding.com/cgi/files";

# maximum file size allowed (kilo bytes)

$max = 100;

# for security reasons, enter your domain name.

# this is so uploads may only occur from your domain

# enter any part of your domain name, or leave this

# blank if you don't mind other web sites using your copy

$domain = "";

# if a file is successfully uploaded, enter a URL to redirect to.

# leave this blank to have the default message printed. If using

# this var, it must begin with http

$redirect = "http://www.cincywedding.com";

# if you would like to be notified of uploads, enter your email address

# between the SINGLE quotes. leave this blank if you would not like to be notified

$notify = '';

# UNIX users, if you entered a value for $notify, you must also enter your

# server's sendmail path. It usually looks something like : /usr/sbin/sendmail

$send_mail_path = "/usr/sbin/sendmail";

# WINDOWS users, if you entered a value for $notify, you must also enter your

# server's SMTP path. It usually looks something like : mail.servername.com

$smtp_path = "mail.yourserver.com";

# set to 1 if you would like all files in the directory printed to the web page

# after a successful upload (only printed if redirect is off). Set to 0 if you

# do not want filenames printed to web page

$print_contents = 1;

# allow overwrites? 1 = yes, 0 = no (0 will rename file with a number on the end, the

# highest number is the latest file)

$overwrite = 0;

# file types allowed, enter each type on a new line

# Enter the word "ALL" in uppercase, to accept all file types.

@types = qw~

txt

jpeg

jpg

gif

GIF

JPG

JPEG

~;

####################################################################

# END USER EDITS

####################################################################


   Report 
   01-30-2006, 2:54 AM
Amanita is not online. Last active: 1/30/2006 6:51:48 PM Amanita

Top 500 Posts
Joined on 01-30-2006
Posts 1
Re: CGI application misbehaved by not returned complete set of HTTP headers
Reply Quote
I had this problem and solved by adding the following around my code:

#!perl -w

use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;


print header;
print start_html("Environment");

(Code here)

print end_html;

Hope this helps.
Amanita


   Report 
   08-24-2007, 9:10 PM
schmad27 is not online. Last active: 8/25/2007 11:51:35 AM schmad27

Not Ranked
Joined on 08-25-2007
Posts 1
Re: CGI application misbehaved by not returned complete set of HTTP headers
Reply Quote
Could you be more specific? Did you put this code in every cgi file?  I wonder what would happen if all the cgi files were just renamed with a pl extension?  I am having this same type of problem. 
   Report 
Webhost4life Fo... » General Discuss... » PERL » CGI application misbehaved by not returned complete set of HTTP headers

Powered by Community Server, by Telligent Systems