Re: running cgi off the command line works, but running on the browser fails with a 500 error



On 9/27/07, Pat Rice <patrick.j.rice@xxxxxxxxx> wrote:

Line 25 -- shown below, is just a simple getstore, this works when run from
the command line, but when run form the webserver, I get above error
message, I've tried the usual 500 error messages, just wondering if anyone
has any ideas ???

A "500 error message" is pretty nearly useless; what you want is the
dying words from your program, which are probably in your server's
error log.

But I'd guess from the nature of your problem that you might have a
different version of Perl on the webserver than you used for testing
on the command line. Or, you didn't use the -w switch when you tested
your program on the command line.

1 #!/usr/bin/perl -w
2 use CGI qw(:standard);
3 use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
4 use strict;
5 #### adding the bits from teat.pl
6 use warnings;
7 use LWP::Simple;

I suspect that LWP::Simple is trying to import a subroutine named
head(), but you already got one from the CGI module. If that's the
case, you can tell either one of the modules that you don't want it to
import head(), and that should solve your problem.

Cheers!

--Tom Phoenix
Stonehenge Perl Training
.



Relevant Pages

  • Re: Improperly Configured Screen ?
    ... As recommanded I added "exit 0" at the beginning of the gdm file using the ... command "nano gdm" from root, ... Her are some general information and the warning or error messages I found ...
    (Debian-User)
  • Re: Improperly Configured Screen ?
    ... As recommanded I added "exit 0" at the beginning of the gdm file using the ... command "nano gdm" from root, ... Her are some general information and the warning or error messages I found ...
    (Debian-User)
  • Re: handling of errors in slave
    ... controller language go so native, but that doesn't really address your problem ... ... is to trap the error messages, parse out the command names, translate them into the user's language, and reassemble the error message before showing it to the user. ... I haven't actually tried to do this yet, but it presumably wouldn't be terribly difficult since the form of the error messages is limited and we can generate a list of commands to search for. ... the task would be simplified if Tcl supported this by setting a variable to contain the name of the offending command so that we don't have to parse it out. ...
    (comp.lang.tcl)
  • Re: Pages wont open in IE6 (SP2)
    ... That's not Java, it's JavaScript - something entirely different. ... That command put the proper entry in the Registry so that IE can find ... Please respond in Newsgroup only. ... this thread with the details and any error messages. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Running XCopy using AT command
    ... With the AT command the system account has local access rights but none ... Since jobs run in their own environment, ... type the name of your batch file. ... able to see all the error messages. ...
    (microsoft.public.windows.server.general)