No problemo, quick is my middle name.  No, that's not true.  Slow and
lazy is...

Yup, the "use CGI::Carp 'fatalsToBrowswer';" should go right near the
top.  In the script you probably have:

#!/usr/bin/perl -w

use strict;
use CGI;

Put it right there, after the use CGI; or whatever else happens to be
there.

Brian Johnson
Partner/Systems Administrator/Programmer
Source1Hosting.tv, LLC (www.source1hosting.tv)
Source1Results.com, LLC (www.source1results.com)
I may be insane, but remember - The only
difference between an insane man and a
genius is his jacket.


> Thanks for getting back to me so quickly, but I have two 
> quick questions:
> 
> With regard to your second suggestion, is use CGI::Carp 
> 'fatalsToBrowser';
> supposed to be entered in the perl script?  And in the third 
> suggestion, is
> that also Perl?  Again, should I stick it into the script I 
> want to debug?
> 
> Rob
> 
> -----Original Message-----
> From: Brian [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 17, 2001 10:40 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Dreaded Internal Server Error
> 
> 
> First off, I wouldn't make the file owned by nobody and have 
> permissions
> of 755.  Somebody could find a hole in your code, write over 
> the script,
> and have it execute something nasty and not good.
> 
> Second, try this:
> use CGI::Carp 'fatalsToBrowser';
> 
> If that doesn't work for ya (which it doesn't for me every once in a
> while) then try this:
> 
> BEGIN {
>  open STDERR, ">&STDOUT";
>  $oldfh = select STDOUT;
>  $|=1;
>  select STDERR;
>  $|=1;
>  select $oldfh;
>  print "Content-type: text/html\n\n";
> }
> 
> These 2 things basically do the same thing, they print the 
> error message
> to the screen so you can further diagnose your problem.  :o)
> 
> If this doesn't work, try posting some code so we can see it. 
>  Maybe one
> of the many gurus will see something that you are missing.
> 
> Brian Johnson
> Partner/Systems Administrator/Programmer
> Source1Hosting.tv, LLC (www.source1hosting.tv)
> Source1Results.com, LLC (www.source1results.com)
> I may be insane, but remember - The only
> difference between an insane man and a
> genius is his jacket.
> 
> >
> > Hi,
> >
> > I'm trying to get a cgi program working (I didn't write it) and I'm
> > experiencing some mysterious problems.  First of I'll, I
> > should tell you
> > that the error I get is the dreaded "Internal Server Error"
> > message.  I've
> > also looked in the logs, and they're further explicated as follows:
> >
> > [Tue Jul 17 00:42:16 2001] [error] (2)No such file or
> > directory: exec of
> > /var/www/html/ebay/cgi-bin/spawn_server.cgi failed
> > [Tue Jul 17 00:42:16 2001] [error] [client 64.231.11.99]
> > Premature end of
> > script headers: /var/www/html/ebay/cgi-bin/spawn_server.cgi
> >
> > Now for some details:
> >
> > 1) I'm using Apache 1.3.20
> >
> > 2) I'm using ScriptAlias to specify the cgi-bin directory
> >
> > 3) I can execute a simple 'hello world' program in the same cgi-bin
> > directory both from the shell, and through CGI.  The
> > permissions for all the
> > files are 755.  The owner of the file is 'nobody', and the
> > group is 'root'.
> >
> > 4) I've tried debugging the script by adding a print
> > statement, and I found
> > that the program would execute from the shell, but not
> > through CGI.  The
> > program expects a ton of parameters to be passed to it from
> > the browser, and
> > when I'm executing it from the shell, the only sign that it
> > is working is
> > the output from my print statement.
> >
> > It almost seems as if CGI is actually intermittent.  I ran
> > the script as
> > follows:
> >
> > perl -cw spawn_server.cgi and the output of that indicated
> > that the code was
> > ok.
> >
> > I know that this error is very general, but any help 
> pointing me in a
> > direction for debugging it would be most appreciated.
> >
> > Rob Yale
> >
> >
> > --
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to