I have an image i saved in both my:
folders in Unix.
I wrote a web page which is supposed to call a CGI Perl form to read the
info, which it does.
It then calls upon my cgi page, which at the bottom, if you look, is
supposed to load that image on the bottom. It for some reason only
portrays a small white box, as you can see. It loads up the page though as
if the picture is there. What is going on, why isn't the picture shown?
Secondly if I want to put 2 images on the page, can i include both under
the same form header?
Third, is the only way to test which picture was selected reading in the
x,y values or is there a more efficient way?
The issue is the following:
There are directoties on the web server where normal HTML pages and other
static pages are. These are given to the client for requesting a certain
There are other web directories which store CGI scripts. These are
executed when the appropriate URL is requested.
Altough it is possible to have a directory configured to store both type
of files, it is rarely done for security reasons.
Thus the server tries to execute the GIF, which it can not. You have to
alter your program to refer to the image as /kook.gif not only kook.gif
which means that the gif is looked for in the cgibin directory. And you
have to place the GIF only in your public_html directory.
Never mix cgi scripts and static web files in a directory, even if
configurration allows you.
[ back to toc ]