in reply to ModPerl IIS

IIS displays 'CGI Program misbehaved' as error.

You said you were using mod_perl, but it seems you are actually using CGI.

A quick google search reveals that the full error message was probably

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

The error is that you didn't return a proper CGI response. You should use the CGI module and use its header method to create the proper headers.

If you are doing that, it could be that some error (possibly a compile-time error) occurred before your call to header had a chance to execute. If so, this should be logged in your web server's error log. If not, it's a question of configuring your web server (which has nothing to do with Perl). Alternative, you may be able to redirect error messages to the screen using CGI::Carp.

use CGI::Carp qw( fatalsToBrowser );

PS — mod_perl is a plugin for Apache. If you're using IIS, you're not using mod_perl.

PPS — That language is named "Perl", not "PERL".

Replies are listed 'Best First'.
Re^2: ModPerl IIS
by Kargil Jay (Initiate) on Feb 24, 2011 at 21:52 UTC
    Thank you for help.
    You are right ikegami.. the error message is like what you said..
    
    But indeed, I see code like this :
     $cgi->session()->data()->{cw_request} = $req->toJson();
     $vars->{request} = $req;
     $template->process('business_objects.html', $vars, \$html) ;
    
    I don't know if it CGI, mod_perl. I thought both went together in this code.
    
    My apologies to monks if I wasted your time. 
    
      Things to try:

      Look for the use... lines at the top of the scripts. You might well be running Apache::Registry, which lets you run CGI programs with little or no modifications.

      Look under your Start menu and see if Apache is installed there. mod_perl doesn't run under IIS.

      Talk to whoever gave you this assignment. Someone must have written this code. Someone must know something about the configuration.

      You came here for help. Keep asking. Ignore anyone who is pointlessly hostile.

      --marmot

      I don't know if it CGI, mod_perl.

      There's not much I can do about it if you didn't believe me the first time around.

      the error message is like what you said..

      Then the solution is like what I said. I'm not sure what else you want from me. You didn't ask any new question or indicate any new problem.

        sorry, my bad english.. I wanted to say 'I did not know before hearing from you, if it is CGI/mod_perl'.. but rather conveyed 'I don't know if it CGI, mod_perl' . 
        
        Now I am sure, it is IIS . Not mod_perl but CGI with Templates.
        
        Now Could some monk please throw light in 
        sorry, my bad english.. I wanted to say 'I did not know before hearing from you, if it is CGI/mod_perl'.. but rather conveyed 'I don't know if it CGI, mod_perl' . 
        
        Now I am sure, it is IIS . Not mod_perl but CGI with Templates.
        
        Now Could some monk please throw light,  in what kind of environment I can use to debug this? IDE etc.