http://www.perlmonks.org?node_id=335447


in reply to Re: Setting up Perl/CGI with Windows
in thread Setting up Perl/CGI with Windows

Hello I have installed activeperl on windows 2003 with IIS6. when i try to run a cgi file, i get the error CGI application misbehaved by not returning a complete set of HTTP headers Anyone has an idea?
  • Comment on Re: Re: Setting up Perl/CGI with Windows

Replies are listed 'Best First'.
Re: Re: Re: Setting up Perl/CGI with Windows
by strat (Canon) on Mar 11, 2004 at 09:27 UTC
    Either you don't send a content-type, or you don't send it as the first output. Does the following code work?
    #! /usr/bin/perl use warnings; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); my $cgi = CGI->new(); print $cgi->header(), $cgi->start_html('Testpage'); print $cgi->h1('Testpage'); print $cgi->end_html();

    Best regards,
    perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8.8.8.32.11.32"

Re: Re: Re: Setting up Perl/CGI with Windows
by Anonymous Monk on May 26, 2004 at 13:52 UTC
    I also setup perl on win2k3 and iis6 and i too get the cgi header error. i do have the content-type line as my first line after the shebang line. i have read pages and pages of information on the web. all my scripts work in a command line, but not in IE. Any ideas???