png icons will not display

Hi

I have the example.php scripts running www.dataguard.co.nz/forecast/example.php but the icons will not display

Server location of plain text forecast

$slplaintxt = “plaintext.txt”;

Server location of weather type file

$slwxtypdat = “wxtypedata.txt”;

Server location of fallen precip file

$slprecipam = “precipamt.txt”;

Web location of forecast images directory

$imglnkloc = “http://www.dataguard.co.nz/forecast/

Thanks
Tony

Are you sure you downloaded both image packages?
There is one large package with icons like partlycloudy-d.png and then there is a update package for the pop images…

I downloaded and installed both the script.zip and imgpack.zip files.

Thanks

Still no luck with the icon display, got me confused

[b]Broken Images - http://www.dataguard.co.nz/forecast/example.php[/b]

http://www.dataguard.co.nz/forecast/example.php

  1. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=partlycloudy-d.png&inclr=
  2. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-n.png&inclr=
  3. http://www.dataguard.co.nz/forecast/icongen.php?instr=60%&inpic=rain-d.png&inclr=
  4. http://www.dataguard.co.nz/forecast/icongen.php?instr=30%&inpic=rain-n.png&inclr=
  5. http://www.dataguard.co.nz/forecast/icongen.php?instr=20%&inpic=rain-d.png&inclr=
  6. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-n.png&inclr=
  7. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-d.png&inclr=
  8. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=mostlycloudy-n.png&inclr=
  9. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=cloudy-d.png&inclr=
  10. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=partlycloudy-d.png&inclr=
  11. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-n.png&inclr=
  12. http://www.dataguard.co.nz/forecast/icongen.php?instr=60%&inpic=rain-d.png&inclr=
  13. http://www.dataguard.co.nz/forecast/icongen.php?instr=30%&inpic=rain-n.png&inclr=
  14. http://www.dataguard.co.nz/forecast/icongen.php?instr=20%&inpic=rain-d.png&inclr=
  15. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-n.png&inclr=
  16. http://www.dataguard.co.nz/forecast/icongen.php?instr=80%&inpic=rain-d.png&inclr=
  17. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=mostlycloudy-n.png&inclr=
  18. http://www.dataguard.co.nz/forecast/icongen.php?instr=&inpic=cloudy-d.png&inclr=
  19. http://www.dataguard.co.nz/forecast/icongen.php?instr=20%&inpic=rain-n.png&inclr=

Tony,

You may want to check with your host to see if they have GD installed. The script could very well be failing when it’s trying to overlay the PoP on the image.

  • Jim

I will check with them, what does GD actually stand for?

Thanks

What does “gd” stand for?

In gd 1.0, it stood for “gif draw.” After the Unisys patent on the LZW compression used in GIF came to light and GIF support was dropped, it did not officially stand for anything, but let’s just say “graphics draw” and leave it at that. (GIF support is back, thanks to the expiration of the patent, but gd can draw much more than GIFs.)

Source:
http://www.libgd.org/FAQ#What_does_.22gd.22_stand_for.3F

Goggle is your friend…

There’s a script on http://saratoga-weather.org/scripts.php that you can upload and call that will show what PHP and GD (if any) you are running. That’ll probably be quicker than waiting for tech (non)support to answer your question. :slight_smile:

Thanks for the GD explanation. I ran the test file and GD is supported, pasted below.

Does PHP work?
Yes, it does. PHP Version 5.0.4
To run the WXSTICKER script, you need GD enabled in PHP.
Current GD status:

GD support: yes
GD Version: bundled (2.0.28 compatible)
FreeType Support: yes
FreeType Linkage: with freetype
T1Lib Support: no
GIF Read Support: yes
GIF Create Support: yes
JPG Support: yes
PNG Support: yes
WBMP Support: yes
XPM Support: no
XBM Support: yes
JIS-mapped Japanese Font Support: no
If you don’t see “Yes, it does.” above, then PHP is not enabled.

Sorry for that wild goose chase then Tony. - Jim

Thats fine Jim, eventually will work it out i hope :wink:

Maybe I have missed some image setting somewhere else

Tony

Can you use the URL of an image to see it in a browser? Are the permissions set correctly?

Yes I have tried both and i can get an image, this is very strange

Does anyone know if the icongen.php needs any editing for the icons to display?

I have tried everthing to get the icons to display for the last 3 weeks, is there anybody that can help me solve this? would be much appreciated so I can move on.

thanks
Tony

If I try to view one of your images I get the following error:

[quote]The image

Yes I have followed your instructions and they now display…thank you very much.

I have these setup in a test folder on my ftp server, how do I now have it displayed on my homepage and forecast page?

www.dataguard.co.nz

Tony

http://www.dataguard.co.nz/forecast/example.php is working now. Good deal.

Here’s how I added the horizontal forecast to my site:


<?php require("wsofd.php"); ?>
<?php require("horizontal.php"); ?>