From owner-freebsd-questions Wed Feb 24 14: 7: 6 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mail.greatbasin.net (mail.greatbasin.net [207.228.35.39]) by hub.freebsd.org (Postfix) with ESMTP id 420FC122E5 for ; Wed, 24 Feb 1999 14:07:03 -0800 (PST) (envelope-from dan@jgl.reno.nv.us) Received: from pandora.home (jgl.reno.nv.us [207.228.2.142]) by mail.greatbasin.net (8.9.3/8.9.3) with ESMTP id VAA06487; Tue, 23 Feb 1999 21:18:05 -0800 (PST) Received: from danco (danco.home [10.0.0.2]) by pandora.home (8.9.2/8.9.2) with SMTP id VAA05624; Tue, 23 Feb 1999 21:18:02 -0800 (PST) (envelope-from dan@jgl.reno.nv.us) Message-ID: <00da01be5fb5$0e130780$0200000a@danco.home> From: "Dan O'Connor" To: "Phil" , Subject: Re: cgi errors Date: Tue, 23 Feb 1999 21:17:43 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.3155.0 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Phil wrote: >So, when I go to this page I always get the >same error message. I'm sure >you have all seen it before; >Internal Server Error If this is a perl script, run it from your shell account. CGI's write to standard output, so you should be able to see any CGI output. Two hints: 1. Use the -w option in the first line: #! /usr/bin/perl -w From the perl man page: "Whenever you get mysterious behavior, try the -w switch!!! Whenever you don't get mysterious behavior, try using -w anyway." This will give you more informative error messages. 2. Remember that the first thing printed by a CGI script (other than other HTTP headers) must be: print "Content-type: text/html\n\n"; If the script is, say, a shell script, do this: #! /bin/sh echo Content-type: text/html echo echo Good luck, --Dan ** The thing I like most about Windows 98 is... ** You can download FreeBSD with it! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message