Author Topic: Godaddy PHP issue  (Read 529 times)

0 Members and 1 Guest are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 798
    • GosportWx.com
Godaddy PHP issue
« on: February 25, 2018, 04:50:12 PM »
Ever since GoDaddy upgraded to PHP 7.0 or whatever I keep getting errors like this not just with metar conditions inc.php anyway I can go back to a previous version who any idea how to fix these petty errors?

Notice: Undefined variable: metarGMT in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 172

Warning: reset() expects parameter 1 to be array, null given in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 651

Warning: Invalid argument supplied for foreach() in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 656
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportWxcom
-----------------------------------------------------------

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6876
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Godaddy PHP issue
« Reply #1 on: February 25, 2018, 06:38:47 PM »
Ever since GoDaddy upgraded to PHP 7.0 or whatever I keep getting errors like this not just with metar conditions inc.php anyway I can go back to a previous version who any idea how to fix these petty errors?

Notice: Undefined variable: metarGMT in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 172

Warning: reset() expects parameter 1 to be array, null given in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 651

Warning: Invalid argument supplied for foreach() in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 656
I'd not seen those before, but will take a look.  In the code, the first Notice error appears when the fetch of a METAR was unsuccessful (RC != 200).  The 651 line implies that the $Conditions array was not loaded, and the 656 error implies the same.  Very strange.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline mkutche

  • Forecaster
  • *****
  • Posts: 798
    • GosportWx.com
Re: Godaddy PHP issue
« Reply #2 on: February 25, 2018, 07:32:32 PM »
Ever since GoDaddy upgraded to PHP 7.0 or whatever I keep getting errors like this not just with metar conditions inc.php anyway I can go back to a previous version who any idea how to fix these petty errors?

Notice: Undefined variable: metarGMT in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 172

Warning: reset() expects parameter 1 to be array, null given in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 651

Warning: Invalid argument supplied for foreach() in /home/hj2ke8lfpx43/public_html/get-metar-conditions-inc.php on line 656
I'd not seen those before, but will take a look.  In the code, the first Notice error appears when the fetch of a METAR was unsuccessful (RC != 200).  The 651 line implies that the $Conditions array was not loaded, and the 656 error implies the same.  Very strange.

I contacted godaddy on how to revert back to old versions of php I'm at 7.0 and I don't see any errors popping up .. the current version is 7.1
Mike K.
WS2080 - Cumulus MX v3.0.0
Gosport, Indiana
Gosportwx.com Gosportwx.com/PWS/ Gosportwx.com/j-template/ twitter.com/GosportINWX facebook.com/GosportWxcom
-----------------------------------------------------------

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 5472
Re: Godaddy PHP issue
« Reply #3 on: February 25, 2018, 07:48:46 PM »
I've  <!-- my metars on flyout menu. They were always slow loading usually hourly only when 5 minute data updates are available now even with airports they seem out of place.
Randy

 

anything