Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.18.0 (build 3190) - 15 June 2022

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are interested in supporting Cumulus then maybe you would like to contribute to the maintenance of the Wiki? This need not take hours of your time - just a half hour here and there can make a big difference, particularly if many people are doing this. Any contributions are very welcome, whether they involve new content or editing of existing content. It will be very helpful to current and future users of Cumulus software if the Wiki is kept well-maintained and current. If you are interested then please contact forum user saratogaWX and ask for a Wiki account.

PHP 8.1 fixes for Saratoga templates...

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
Posts: 1112
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA

PHP 8.1 fixes for Saratoga templates...

Post by saratogaWX »

I'd just gotten to install PHP8.1 and found some new Deprecated errata in the Base template set.

Mainly, the default casting of a float to an integer now gives a Deprecated message so things like

Code: Select all

$dir = $windlabel[ fmod((($winddir + 11) / 22.5),16) ];
had to change to

Code: Select all

$dir = $windlabel[ (integer)fmod((($winddir + 11) / 22.5),16) ];
to quiet the messages.

Also, the

Code: Select all

$minutes = intval(($sec / 60) % 60);
was changed to

Code: Select all

$minutes = intval(fmod($sec / 60, 60));
In the GD library, the imagepolygon() and imagefilledpolygon() went from 4 arguments to 3 (losing the $num_args entry).

So.. I've been working on the Base-USA, CU-plugin site and will work on the Canada and World sites shortly.
I've updated the distributions with the following fixes:

Version 3.347 - 18-Jan-2022 (Base-*) PHP 8.1 updates to fix Deprecated errata: get-USNO-sunmoon.php V3.04, include-wxstatus.php V1.13, thermometer.php V1.18;
(Base-USA) advforecast2.php V5.18, NWS-regional-radar-animate.php V1.04, radar-status.php V1.18;
(CU-Plugin) PHP8.1 updates to fix Deprecated errata and add new CumulusMX data variables: CU-defs.php V1.12

Use the update tool with your Base and Plugin for 18-Jan-2022

I've attached a text file showing the main diffs of old/new files.

p.s. -- PHP 8.1 also announced the Deprecation of strftime()/strptime() built-in's ..the mesonet-map, global-map use that (and likely others too).
You do not have the required permissions to view the files attached to this post.
User avatar
Posts: 1333
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS
Operating System: Ubuntu 22.04 LTS
Location: Bangor, NI

Re: PHP 8.1 fixes for Saratoga templates...

Post by ConligWX »

Thanks for this Ken,

Am thinking of moving to PHP 8.x very soon.
mcrossley wrote:
- are the default CumulusMX Templates php 8.x compatible?
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir PA-II-SD • CumulusMX •
Post Reply