From owner-freebsd-isp Sat Jun 27 22:06:27 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA27329 for freebsd-isp-outgoing; Sat, 27 Jun 1998 22:06:27 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from aniwa.sky (aniwa.actrix.gen.nz [203.96.56.186]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27319 for ; Sat, 27 Jun 1998 22:06:14 -0700 (PDT) (envelope-from andrew@squiz.co.nz) Received: from localhost (andrew@localhost) by aniwa.sky (8.8.7/8.8.7) with SMTP id RAA01221; Sun, 28 Jun 1998 17:04:41 +1200 (NZST) (envelope-from andrew@squiz.co.nz) X-Authentication-Warning: aniwa.sky: andrew owned process doing -bs Date: Sun, 28 Jun 1998 17:04:40 +1200 (NZST) From: Andrew McNaughton X-Sender: andrew@aniwa.sky Reply-To: andrew@squiz.co.nz To: Mahlon Smith cc: Emmanuel Gravel , isp@FreeBSD.ORG Subject: Re: Setting up Apache In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > 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