Page 1 of 1

PHP 8.* getJSON

Posted: Mon 08 Apr 2024 12:22 pm
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.*

Re: PHP 8.* getJSON

Posted: Mon 08 Apr 2024 12:35 pm
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...