Re: running cgi off the command line works, but running on the browser fails with a 500 error
- From: tom@xxxxxxxxxxxxxx (Tom Phoenix)
- Date: Thu, 27 Sep 2007 09:44:02 -0700
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
.
- References:
- Prev by Date: Re: How to set environment variable
- Next by Date: Re: running cgi off the command line works, but running on the browser fails with a 500 error
- Previous by thread: running cgi off the command line works, but running on the browser fails with a 500 error
- Next by thread: Re: running cgi off the command line works, but running on the browser fails with a 500 error
- Index(es):
Relevant Pages
|