Re: Partial output from cgi script

Michiel Boland <[email protected]> Sat, 26 Feb 2005 16:34:27 +0100 (MET)
Newsgroups gmane.network.mathopd
Message-ID <Pine.GSO.4.62.0502261624470.16174@brakkenstein.nijmegen.internl.net>
On Sat, 26 Feb 2005, Alex'a X Spirit wrote:

> Suppose I have a script:
>
> 	#!/bin/sh
> 	printf "Content-type: text/plain\n\n"
> 	echo "`man -k more`"
>
> If I run it from command line it puts on my machine:
[...]
> But, if such script executes in browser I have (without any errors in
> all logs):
[...]
> Where is the last 5 lines?? Why mathopd cuts cgi output?

My guess is that you have set some environment variables, like MANPATH, 
that are unset when the server is started. Try running the following 
script from the command prompt, and in a browser. Then note the 
differences.

 	#!/bin/sh
 	/usr/bin/env

Cheers
Michiel