catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Scripting Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 17-03-2006, 02:48 PM   #1 (permalink)
Registered User
 
CAT4361's Avatar
 
Join Date: Mar 2006
Posts: 14
CGI scripts

I am trying to put a CGI script onto my site but I keep getting the following error:

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

I have tried uploading a very simple script incase there is a bug in the script:

#!D:\Perl\bin\Perl.exe -wT
use strict;
use CGI ':standard';

print "Content-type: text/html\n\n";
print "Hello world";


Any suggestions what I am doing wrong?

Thanks in advance,
Stephen
CAT4361 is offline   Reply With Quote
Old 17-03-2006, 07:44 PM   #2 (permalink)
Bring me your problems :p
 
paulredpath's Avatar
 
Join Date: Jan 2003
Location: /dev/ahhhhhhhhh
Posts: 3,537
Are you using a .cgi extension?
paulredpath is offline   Reply With Quote
Old 18-03-2006, 11:55 AM   #3 (permalink)
Registered User
 
CAT4361's Avatar
 
Join Date: Mar 2006
Posts: 14
I managed to get it working, it doesn't seem to like the '-' before the switch in the shebang line...

#!/usr/bin/perl -wT

It prefers:
#!/usr/bin/perl wT

No idea why but it seems to be working !!

(I have saved my scripts with the extension .pl)

Stephen
CAT4361 is offline   Reply With Quote
Old 18-03-2006, 11:58 AM   #4 (permalink)
Registered User
 
CAT4361's Avatar
 
Join Date: Mar 2006
Posts: 14
I know I have changed the shebang line but I have tried it with both:

#!D:\Perl\bin\Perl.exe wT
and

#!/usr/bin/perl wT

and it's definately the '-' in the switch causing the problem.
CAT4361 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 12:26 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.