returning image from CGI.
| From: | Nicklas Kittelmann | Date: | Fri, 20 Feb 2004 12:28:12 +0000 |
| Subject: | returning image from CGI. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178335@lists.php.net to get a copy of this message | ||
Hi!
I have a PHP-file which outputs an image when called from a web page. No
problem there.
However, when I change it to a CGI-file (for use by a webserver), and I
insert a line
#/usr/bin/php -q
before the <?php -tag, the result is that a newline is inserted in the
output, and the image is broken.
How do I fix this?
The reason that I need to have it as a cgi is for sequrity (the web
server runs cgi's as a different user).
I have run other php-files renamed to cgi, that output HTML, and that
works perfectly.
/Nicklas Kittelmann