Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.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

PHP 8.* getJSON

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
Mapantz
Posts: 1824
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

PHP 8.* getJSON

Post by Mapantz »

Hi

I've been updating scripts that have had errors while testing on PHP 8.2.

I've got almost everything fixed bar one item:

Code: Select all

  function getwindy(model,step){
    $.ajaxSetup({ cache: false });
    var moty = getType();
    $.getJSON('ewn/ewn/ewn_proxy.php?callback=?',{"model":model,"step":step},function(result){
      canvasOverlay = L.canvasOverlay().drawing(redraw).addTo(wsmap);
      windy = new Windy({canvas: canvasOverlay.canvas(), data: result});
      context = canvasOverlay.canvas().getContext('2d');
      wsmap.on('dragstart', function() { clearWind() });
      wsmap.on('zoomstart', function() { clearWind() });
      wsmap.on('resize', function() { clearWind() });
      windyCache['model']=[];
      windyCache['model']['moty']=[];
      windyCache['model']['moty']['step']=result;
    });
  }
The URL gives a 500 internal server error on PHP 8.* but not on 7.*
Image
User avatar
ConligWX
Posts: 1635
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04 LTS
Location: Bangor, NI
Contact:

Re: PHP 8.* getJSON

Post by ConligWX »

I'm guessing that something in the ewn_proxy.php file is not compatible with 8.2. Does the apache logs show anything of value when accessing the script?

you could ask chatgpt to check the php code I guess...
Regards Simon

https://www.conligwx.org - @conligwx
Davis Vantage Pro2 Plus with Daytime FARS • WeatherLink Live • Davis AirLink • PurpleAir • CumulusMX v4.0.0

Image
Post Reply