The specified CGI application misbehaved by not returning a

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

The specified CGI application misbehaved by not returning a

Post 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
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

I'm on the edge of my seat.. tell us, what is it not returning?
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I think aaronhall wants to see the whole error message; the title is cut.
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post by ryuuka »

error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

and this only happens with this perl script? Or any perl script? Or any script at all?
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

What guide/howto/tutorial did yo use to install/configure perl for your webserver?
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post by ryuuka »

http://www.iisanswers.com/Top10FAQ/t10-installperl.htm

i used this one

note: i use perl.exe to parse the scripts
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post 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
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

You probably get faster and/or better answers in a more perl related forum.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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")
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Code please :) CGI requires you explicitly send headers.
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post 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]
ryuuka
Forum Contributor
Posts: 128
Joined: Tue Sep 05, 2006 8:18 am
Location: the netherlands

Post 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
Post Reply