Author Topic: Dual Images no longer working  (Read 521 times)

0 Members and 1 Guest are viewing this topic.

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Dual Images no longer working
« on: March 28, 2022, 05:58:23 PM »
Hi all,

A couple of days ago, I noticed my dual images are no longer working. I haven't changed anything in quite some time code wise. I downloaded the latest advforecast2.php from Ken's site and tried it. It does the same thing. See here. I am currently running PHP version 7.4 on my site and wondered if this was the problem or not. I have not moved to 8.0.

Thanks,

John
GR2AE, GR3, Cumulus

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: Dual Images no longer working
« Reply #1 on: March 28, 2022, 06:02:02 PM »
John, I currently get a 403 error trying to view your site.  Maybe related?

CW3699

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Dual Images no longer working
« Reply #2 on: March 28, 2022, 06:20:58 PM »
Hi Paul,

That's weird. Granted I have most of the planet blocked, but not the US, Canada, etc.
GR2AE, GR3, Cumulus

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Dual Images no longer working
« Reply #3 on: March 28, 2022, 07:10:16 PM »
The DualImage.php is getting two PHP warning messages (which spoil the PNG output)
Quote
Warning: imagecreatefrompng(): gd-png: libpng warning: iCCP: known incorrect sRGB profile in /home/maumelle/www/www/DualImage.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/maumelle/www/www/DualImage.php:215) in /home/maumelle/www/www/DualImage.php on line 350
That's why it doesn't display correctly.  This was a GD library update that caused the issue with older .png files.

Try downloading the icon template images (in https://saratoga-weather.org/forecast-icon-templates.zip ) and unzip to your ./forecast/icon-templates directory then upload to your website -- that should fix the issue.
« Last Edit: March 28, 2022, 07:16:41 PM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Dual Images no longer working
« Reply #4 on: March 28, 2022, 07:20:34 PM »
Hi Ken,

Downloaded the .zip file, uploaded it. No change. Cleared my browser cache. No change.
GR2AE, GR3, Cumulus

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Dual Images no longer working
« Reply #5 on: March 28, 2022, 08:01:03 PM »
Ahh... do another download from https://saratoga-weather.org/forecast-icon-templates.zip .  I ran the images through ImageMagic mogrify command (with libpng 1.6.37) to remove the bad RGB specs (I hope).  It was libpng 1.6 that started griping about the older PNGs.

Let me know how that works for you.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Otis

  • (aka Paul)
  • Forecaster
  • *****
  • Posts: 724
    • Lake Huron Weather
Re: Dual Images no longer working
« Reply #6 on: March 28, 2022, 08:10:46 PM »
Yea strange, I have visited your site before.  It says Forbidden, don't have access to this resource.
My carrier is Spectrum.
Computers/Internet; as a friend would say "it is FM", fircken magic ](*,)

CW3699

Offline Maumelle Weather

  • Forecaster
  • *****
  • Posts: 1824
    • Maumelle Weather
Re: Dual Images no longer working
« Reply #7 on: March 28, 2022, 08:15:24 PM »
Thank you again, Ken!!!! I would have never figured it out.

John
GR2AE, GR3, Cumulus

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Dual Images no longer working
« Reply #8 on: March 28, 2022, 08:26:52 PM »
Excellent!  I've updated my distribution files with the fixed .png files so as others encounter the issue, a simple download/upload can fix the issue.

My main site is running PHP 8.1.4, but the GD library libpng is 1.5, so I'd not had the problem before.  Lots of stackoverflow talk about the error with libpng 1.6+ versions.   I had to install a portable version of ImageMagick and process the files.. glad it's no longer a problem.  Thanks for bringing it to my attention, John.

BTW, the original images were produced by NOAA NWS graphic artists and captured in 2015 as they started changing to the new graphics icons.
« Last Edit: March 29, 2022, 10:32:22 AM by saratogaWX »
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline Bashy

  • brecklandweather.com/meteo
  • Forecaster
  • *****
  • Posts: 1465
  • brecklandweather.com/index.php
    • Breckland Weather
Re: Dual Images no longer working
« Reply #9 on: March 28, 2022, 11:10:34 PM »
Yea strange, I have visited your site before.  It says Forbidden, don't have access to this resource.
My carrier is Spectrum.
Computers/Internet; as a friend would say "it is FM", fircken magic ](*,)

Its got to be whatever they are using blocking other countries, are you using a proxy server?
I am in the UK and i too am blocked, but using a proxy in Nevada, i can now view the site
Kind regards
Bashy

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Dual Images no longer working
« Reply #10 on: March 29, 2022, 11:56:24 AM »
I've now put the updated icon-template/*.png files in the Base-USA (and icon files) distributions along with a minor fix to DualImage.php V1.03 to remove Deprecated PHP 8.1 messages.

Update from the update tool page with a query of Base-USA, *-Plugin, 28-Mar-2022 to get the icons and the updated DualImage.php script.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP