in reply to CGI display a gif

Right click (or equivalent) on the image with a broken box, and choose 'Open Image in New Window' (or equivalent).

This will show you where the browser is trying to link to, and any error message that the server is ending to the browser.

If that wasn't useful, check your web server's error logs. (I always keep a 'tail -f' running on my error logs when debugging -- anything that shows up in there is a problem, and needs to be dealt with ... even if it's script kiddies trying to root your site, search engines looking for 'robots.txt', or obnoxious browsers looking for 'favicon.ico')

Replies are listed 'Best First'.
Re^2: CGI display a gif
by indie_campbell (Novice) on Jun 06, 2005 at 16:15 UTC
    this directs me the right location http://localhost/cgi-bin/1.gif but reports an 500 internal server error??

      Which is what I suspected. (well, I actually expected a different URL, but I suspected the 500 error, or possibly a 403 (access forbidden, if it was trying to execute a file that didn't have execute permissions) )

      To confirm that bassplayer's and my suspicions are correct, you'll want to continue with the rest of my suggestion:

      If that wasn't useful, check your web server's error logs.

      You really should check your webserver's error log, as there's most likely something more informative in there. (well, maybe not, as it might throw some misleading errors if it's trying to execute something that's not an executable file.)

      Perhaps it's trying to execute the image instead of rendering it. The cgi-bin/ directory is special. :-)

      bassplayer

      Follow bassplayer's advice. Some servers treat everything in /cgi-bin (and subdirectories?) as scripts. Executing a .gif won't definitely result in a 500 error. You need to move your images outside of /cgi-bin.