Page 1 of 1

The specified CGI application misbehaved by not returning a

Posted: Fri Jan 19, 2007 5:18 am
by ryuuka
as it says above

i keep getting this error all the time been searching through the power of google
but i found nothing usefull
any idea's as to how i can fix this?

what i tried:
  • 1. renaming cgi to pl
    2. tried to find hot fix
    3. tried to change several IIS rights etc
i'm running
IIS 6.0
PHP 5.1.2
MSSQL
Activestate perl 5.6.1

thanks in advance

Posted: Fri Jan 19, 2007 5:08 pm
by aaronhall
I'm on the edge of my seat.. tell us, what is it not returning?

Posted: Mon Jan 22, 2007 1:21 am
by ryuuka
it is supposed to be a progressbar that opens in a pop-up
should show a bar, upload speed, total file size and how many mb has already uploaded

link: http://www.sibsoft.net/xupload.html

Posted: Mon Jan 22, 2007 1:24 am
by volka
I think aaronhall wants to see the whole error message; the title is cut.

Posted: Mon Jan 22, 2007 1:30 am
by ryuuka
error:

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

Posted: Mon Jan 22, 2007 2:02 am
by volka
and this only happens with this perl script? Or any perl script? Or any script at all?

Posted: Mon Jan 22, 2007 2:40 am
by ryuuka
this happens with all the perl scripts i try to run

weither they are .pl or .cgi

so this essentially says that the problem in the server but
i checked everything that could probably cause this (with help
of the internet) and everything was correct

Posted: Mon Jan 22, 2007 3:02 am
by volka
What guide/howto/tutorial did yo use to install/configure perl for your webserver?

Posted: Mon Jan 22, 2007 4:33 am
by ryuuka
http://www.iisanswers.com/Top10FAQ/t10-installperl.htm

i used this one

note: i use perl.exe to parse the scripts

Posted: Mon Jan 22, 2007 9:37 am
by ryuuka
here's also a few lines from the Error log

HTTP/1.1 GET /cgi-bin/upload_status.cgi?upload_id=401207067&num_files=1&css_name=&tmpl_name= - 1 Connection_Dropped DefaultAppPool

HTTP/1.1 POST /cgi-bin/upload.cgi?upload_id=401207067 - 1 Connection_Dropped DefaultAppPool

Posted: Mon Jan 22, 2007 9:52 am
by volka
You probably get faster and/or better answers in a more perl related forum.

Posted: Mon Jan 22, 2007 11:02 am
by timvw
You'd better show us the code... My guess is that there is no content-type header... (print "Content-Type: text\html\r\n\r\n")

Posted: Mon Jan 22, 2007 1:13 pm
by Chris Corbyn
Code please :) CGI requires you explicitly send headers.

Posted: Tue Jan 23, 2007 1:34 am
by ryuuka
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


k here's the code

about 163 lines so i've taken only the parts that matter

this first line was the standard /usr/blah/bin or something
i pointed it to the perl dir yesterday didn't matter

[syntax="perl"]#!C:\Perl\bin\perl.exe
### XUpload v2.5
### SibSoft.net (26 Jan 2006)

use strict;
use CGI::Carp qw(fatalsToBrowser);
use XUploadConfig;
use HTML::Template;
use CGI qw/:standard/;

Code: Select all

print "Content-type: text/html\n\n";
my $css_file = ($c->{styles}->{$css_name} && -e "Styles/".$c->{styles}->{$css_name}) ? $c->{styles}->{$css_name} : 'default.css';
my $tmpl_file = ($c->{templates}->{$tmpl_name} && -e "$c->{templates_dir}/".$c->{templates}->{$tmpl_name}) ? $c->{templates}->{$tmpl_name} : 'default.html';
my $css;
open F, "Styles/$css_file" || die"IO css error";
$css.=$_ while <F>;
close F;
oh and btw do you know any good perl forums not http://forums.devshed.com/ i hate those people
really bad response time


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Jan 23, 2007 7:52 am
by ryuuka
fixed the problem

in the IIS 6.0 mapping the cgi file pointed towards php-cgi.exe

and it needed to be towards the perl.exe

but now i get the following error:
i checked but all the files are in the correct locations
HTML::Template->new() : Cannot open included file /Templates/default.html : file not found. at HTML/Template.pm line 1616
HTML::Template::_init_template('HTML::Template=HASH(0x1884bf0)') called at HTML/Template.pm line 1189
HTML::Template::_init('HTML::Template=HASH(0x1884bf0)') called at HTML/Template.pm line 1083
HTML::Template::new('HTML::Template', 'filename', '/Templates/default.html', 'die_on_bad_params', 0) called at D:\Website\cgi-bin\upload_status.cgi line 43