Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 1998 17:04:40 +1200 (NZST)
From:      Andrew McNaughton <andrew@squiz.co.nz>
To:        Mahlon Smith <reich@internetcds.com>
Cc:        Emmanuel Gravel <egravel@juno.com>, isp@FreeBSD.ORG
Subject:   Re: Setting up Apache
Message-ID:  <Pine.BSF.3.96.980628165017.1110A-100000@aniwa.sky>
In-Reply-To: <Pine.BSF.3.96.980627003512.24313A-100000@martini.cdsnet.net>

next in thread | previous in thread | raw e-mail | index | archive | help


> > The problem is when I try and access any CGI script, no matter where they
> > are.  Before,
> > I was getting an "access forbidden" error (fixed by changing the
> > properties of the files
> > and directories).  The new error now is Error 500 Internal Server Error
> > (talking about
> > notifying the administrator about a problem in the configuration). 


On Sat, 27 Jun 1998, Mahlon Smith wrote:
 
> Do a 
> 'whereis perl'
> on your system - make sure that the first line in your perl script
> matches it.
> 
> i.e.    
> #!/usr/bin/perl -w

do a '/usr/bin/perl -v' to check which version this is.  Perl 5 defaults
to installing in /usr/local/bin/perl and you may have perl 4 still lurking
in /usr/bin.  This can create problems with newer scripts.

 
> Another good thing to check is the perl script fromt he command line...
> it may be gibberish - or, it may give you a better clue as to what is
> happening.
>
> -Mahlon

I have a macro set up from my text editor to pipe the contents of the
current window to perl, which is very useful for this.  

Also I usually have an xterm window running beside my browser with 
'tail -f /home/www/logs/error_log'.  This gives the first few lines of
stdout from the script if they occur before the http header is complete.

Sometimes it's easiest to just complete the http header right at the
beginning of the script.  After this is done, stderr goes to the browser.
Good for debugging, but probably not a good idea once the script is in
production.


Andrew McNaughton
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980628165017.1110A-100000>