Tech Notes
Tech Notes |
Troubleshooting when no graphics appear on a page
First, use your web browser to of the HTML. Find one of the <img src...> tags that is bringing up a broken graphical image. Usually you can use [Ctrl-F] to Find text, and that is usually quickest.
Next look at the src resource specification very carefully, and copy it to the clipboard. For example it might say <img src="/planet/gif/bltwhub.gif" /> in which case the resource is /planet/gif/bltwhub.gif. In many examples, there is usually a leading / which is good. A very common error in dynamic web pages is to omit that leading slash, so get it copied exactly.
Go back to the browser and request that static filename, relative to your web server. If you are using http://localhost/scripts/... then use http://localhost/scripts/... If you are using http://www.abc.com/cgi-bin/.... then use http://www.abc.com/cgi-bin/planet/...
If you have done this correctly, when you paste in that static file request, it will still come up as a broken image, because you have not fixed anything yet; you have just created a much simpler troubleshooting environment for yourself.
What you need to do is teach your http server software where the path /planet/ or /htdemo/ should resolve to, or you need to move the files to the path it expects you to use. Now the details of this task vary greatly depending on which http server you use.
Here are a couple common cases. I will give both solutions of (A) changing the mappings and (B) moving the files. The latter is a quicker fix, the former is a much more useful skill to learn.
FOR USE WITH WEBSITE (PRO)
(A) Run server admin program. Click to Mappings panel. Add a mapping for /planet/ to c:\htdocs\planet\ or wherever you have put those webhub files.
and
/htdemo/ to c:\htdocs\htdemo\
(B) Move the two directories that are under c:\htdocs (namely planet and htdemo) so that they are instead under c:\website\htdocs.
FOR USE WITH MICROSOFT IIS
(A) Run the server administration program. Select the web server. Go into properties. Look at directory mappings.
Map the directories as listed above for website.
(B) Move the two directories under c:\inetpub\wwwroot\.
FOR USE WITH NETSCAPE SERVERS
(A) not sure exactly where this is in the admin program,but there should be a place to set up directory mapping.
(B) Your web server root will be something like c:\netscape\server\docs\. Move c:\htdocs\planet and c:\htdocs\htdemo under docs\.
After making these changes, retry the simple request for a .gif that you have in your browser. MAKE SURE YOUR BROWSER IS NOT CACHING! In Firefox, hold down SHIFT while clicking reload. You should now see the file. If not, you will need to ask someone for help with your particular web server. Remember, every slash counts.
You can then go back to testing your complete web page. If you still see broken images, it is due to caching problems in the browser or possibly in your internet proxy server. Usually, caching problems can be solved by telling the browser to clear its cache, or by use the SHIFT-reload technique.
Running DynHelp.exe v1.2.0.6 on WebHub-v2.128 built by D15
Calc time: 140 ms

