Author Topic: wxwuhistory.php Persistent Server Errors  (Read 772 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2538
    • SouthEast Lincoln, NE Weather
wxwuhistory.php Persistent Server Errors
« on: August 28, 2020, 02:12:37 PM »
This script, wxwuhistory.php via its includes script, WU-History-inc.php, regularly generates server errors.  This amounted to over 70 MB in just the last week.

Here's a sample of the errors (sanitized):
Code: [Select]
[28-Aug-2020 12:53:04 America/Chicago] PHP Notice:  A non well formed numeric value encountered in (my Server's home)/WU-History-inc.php on line 1399
[28-Aug-2020 12:53:04 America/Chicago] PHP Notice:  Undefined variable: SERVER in (my Server's home)/WU-History-inc.php on line 397
[28-Aug-2020 12:53:04 America/Chicago] PHP Notice:  A non well formed numeric value encountered in (my Server's home)/WU-History-inc.php on line 1399
[28-Aug-2020 12:54:17 America/Chicago] PHP Notice:  Undefined variable: SERVER in (my Server's home)/WU-History-inc.php on line 397
Any thoughts anyone?  (And, yes, I know.  I should just give up on the current shadow of its former self, WU!)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8714
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxwuhistory.php Persistent Server Errors
« Reply #1 on: August 28, 2020, 04:22:38 PM »
You might try the Version 3.4g - 27-Apr-2020 from here

BTW.. the error on 397 was for $SERVER['PHP_SELF'] which should be $_SERVER['PHP_SELF']
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2538
    • SouthEast Lincoln, NE Weather
Re: wxwuhistory.php Persistent Server Errors
« Reply #2 on: August 28, 2020, 05:11:07 PM »
Thanks very much, Ken!

The latest version works, after suitable customization, and my error log is no longer being populated by running the script.

Much appreciated! [tup]
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline dasman

  • Forecaster
  • *****
  • Posts: 485
    • Wx Peotone
Re: wxwuhistory.php Persistent Server Errors
« Reply #3 on: September 11, 2022, 12:13:08 PM »
I have updated my script to 3.4h. I verified all of my settings were customized. I have loaded the new script and my page does not show the data? https://www.peotoneweather.com/wxwuhistory.php. If I click on the Comma Delimited File I can see that. It is the Display table that is blank. Any Ideas?
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 8714
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxwuhistory.php Persistent Server Errors
« Reply #4 on: September 12, 2022, 01:53:25 PM »
I have updated my script to 3.4h. I verified all of my settings were customized. I have loaded the new script and my page does not show the data? https://www.peotoneweather.com/wxwuhistory.php. If I click on the Comma Delimited File I can see that. It is the Display table that is blank. Any Ideas?
I think the issue is in WU-history-inc.php .. a function is returning http as access for the WXDailyHistory.php host for your site, and your site is doing an automatic redirect from http to https.

Try changing
Code: [Select]
   $url  = (false and (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $port == 443) ? "https://" : "http://";
to
Code: [Select]
   $url  = (false and (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') || $port == 443) ? "https://" : "https://";
to force it to use the https protocol.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline dasman

  • Forecaster
  • *****
  • Posts: 485
    • Wx Peotone
Re: wxwuhistory.php Persistent Server Errors
« Reply #5 on: September 12, 2022, 07:50:07 PM »
Ken you are awesome! That did it. Thank you so much.
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network