WXforum.net

Miscellaneous Debris => Tech Corner => Topic started by: mkutche on February 25, 2018, 04:50:12 PM

Title: Godaddy PHP issue
Post by: mkutche 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
Title: Re: Godaddy PHP issue
Post by: saratogaWX 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.
Title: Re: Godaddy PHP issue
Post by: mkutche 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
Title: Re: Godaddy PHP issue
Post by: ValentineWeather 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.