Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Broken image using CGI on the fly generation of image file

Oct 26, 2007 12:51PM PDT

Using-
Apache 2.x
HP-UX 11.11
CGI script written in ksh
gnuplot 4.0
ppmtogif

Getting a broken image (red X) displayed in browser instead of the on-the-fly generated image.

ksh CGI script-
...
echo "Content-type: image/gif\n\n"
ppmtogif file.ppm 2>/dev/null

Is there something else the CGI script should be sending?

Added these 2 lines to the Apache httpd.conf-

AddHandler cgi-script .ksh
AddType image/gif .gif

Are there other modifications to the httpd.conf that I should make?

The script works on the command line, successfully generating the GIF file.

Any ideas or tips would be greatly appreciated.

Thanks.

Discussion is locked