cei has asked for the wisdom of the Perl Monks concerning the following question:

I'm developing a site on a Cobalt RaQ2. My code includes the following:
use CGI; use CGI::Carp qw/fatalsToBrowser/; use DBI; use strict;
When I tail my error log after running my script, I see the following:
[Fri Apr 28 11:11:22 2000] [warn] [client 209.179.110.221] handler "cg +i-wrapper" not found for: /home/sites/site3/web/index.cgi

If I remove the use CGI::Carp qw/fatalsToBrowser/; then I get an error on the web page, and the following in the log:

[Fri Apr 28 11:20:09 2000] [error] [client 209.179.110.221] malformed +header from script. Bad header=Use of uninitialized value at : /usr/cgiwrap/cgiwrap
Any idea what is going on or what I'm doing wrong?

Replies are listed 'Best First'.
Re: cgi-wrapper???
by Punto (Scribe) on Apr 29, 2000 at 03:11 UTC
    Check cobalt's knowledgebase (kb.cobaltnet.com), they tell you how to set up a debugger, you can copy the script to *.pld and you get all the errors and runtime information on the browser. Sometimes is better than running the script from telnet.
Re: cgi-wrapper???
by chromatic (Archbishop) on Apr 28, 2000 at 23:38 UTC
    Are you using Apache? Check your httpd.conf file for an AddHandler line referring to cgi-wrapper. That sounds like a web server configuration to me.

    Can you run your script successfully from the command line? (CGI.pm emulates a web environment when you do this.)

      The httpd.conf file has
      AddHandler cgi-wrapper .cgi AddHandler cgi-wrapper .pl AddHandler server-parsed .shtml AddType text/html .shtml
      in it.

      I debugged my code enough from the commandline that I was able to get rid of the fatal error when the Carp was not in place, so I feel better about my code in general now, but I still don't know why the WARN shows up in the logs...

Re: cgi-wrapper???
by zaphod.nu (Scribe) on Apr 29, 2000 at 03:58 UTC
    I'd check out the /usr/cgiwrap/cgiwrap script...

    That script appears to have some errors in it, you could remove the warning tag from the perl bin line. That would probably make the script run...