From owner-freebsd-questions Sun Nov 25 20:58: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from cody.jharris.com (cody.jharris.com [205.238.128.83]) by hub.freebsd.org (Postfix) with ESMTP id 5CC2037B419 for ; Sun, 25 Nov 2001 20:58:06 -0800 (PST) Received: from localhost (nick@localhost) by cody.jharris.com (8.11.1/8.9.3) with ESMTP id fAQ4w1L87780; Sun, 25 Nov 2001 22:58:01 -0600 (CST) (envelope-from nick@rogness.net) Date: Sun, 25 Nov 2001 22:58:01 -0600 (CST) From: Nick Rogness X-Sender: nick@cody.jharris.com To: Chris Aitken Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Spawning an application with a shell in tow In-Reply-To: <5.1.0.14.2.20011126153909.03a53fc0@mail.ideal.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 26 Nov 2001, Chris Aitken wrote: > At 02:59 PM 26/11/2001, you wrote: > > >Is there any way to spawn off my command so that it utilises a shell, or > >some sort of shell equivilant so expect can run... This is how im > >executing the script.... > > I had a reply suggesting I add a sh -c to the front of my spawning > which seems to partly solve my problem but ive noticed another > occurance in the error logs of apache which I cannot explain.. > > [snip date shite] Premature end of script headers: > /location/to/script.cgi > > No matter if the script has EVERYTHING hashed out, it comes up with > this error, and in the browser barfs with an internal server error.... > > however, if I execute the perl script command line on the freebsd box, > it executes perfectly.... execute it from the web server and it > dies... > > > any ideas ? It needs to output: Content-Type: text/plain\n Before any ouput of the cgi script. Nick Rogness - Keep on Routing in a Free World... "FreeBSD: The Power to Serve!" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message