Author Topic: WU-History-Inc errors  (Read 830 times)

0 Members and 1 Guest are viewing this topic.

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
WU-History-Inc errors
« on: April 19, 2020, 03:24:32 PM »
[11-Apr-2020 06:20:17 America/Indianapolis] PHP Notice:  A non well formed numeric value encountered in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1388

this is line 1388 :    $newdate = mktime (0,0,0,$month,$nday,$year);

[11-Apr-2020 06:20:17 America/Indianapolis] PHP Notice:  Array to string conversion in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1003
[11-Apr-2020 06:20:17 America/Indianapolis] PHP Notice:  Undefined variable: Array in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1003

this is line 1003 :                $data = '<td class = "date">' . substr($tdate['weekday'], 0, 3) . '</td><td class = "date"><a href="' . $$_SERVER['PHP_SELF'] . '?ID=' . $WUID . '&amp;month=' . $pmo . '&amp;day=' .$pda . '&amp;year=' . $pyr . '&amp;mode=1&amp;units=' . $units . '">' . $pda . '</a></td>';  //Date/Time
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #1 on: April 19, 2020, 03:38:59 PM »
Fixed i think.. had to update the script.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #2 on: April 19, 2020, 04:52:01 PM »
nvm updating didnt fix it.. same issue now on line 1237
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #3 on: April 19, 2020, 07:40:04 PM »
I'd updated WU-History-inc.php to Version 3.4f - 16-Apr-2020 - to remove the (now unavailable) image link.

I suggest you download and install that version (https://github.com/ktrue/WU-History for the distribution).

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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #4 on: April 19, 2020, 07:40:57 PM »
I'd updated WU-History-inc.php to Version 3.4f - 16-Apr-2020 - to remove the (now unavailable) image link.

I suggest you download and install that version (https://github.com/ktrue/WU-History for the distribution).

That is the one i updated earlier.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #5 on: April 19, 2020, 07:51:43 PM »
So the logs you're looking at are from 11-Apr-2020 06:20:17 -- what do the logs from 19-Apr-2020 show after you updated the script?
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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #6 on: April 19, 2020, 07:59:54 PM »
I get this now http://gosportwx.com/wxwu-history.php

nvm it updated.. one sec and i will check the logs

Update: nothing since the 19th of April at 6:53PM
« Last Edit: April 19, 2020, 08:01:47 PM by mkutche »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #7 on: April 19, 2020, 08:03:04 PM »
http://gosportwx.com/wxwu-history.php looks ok to me... what issue are you seeing that am I missing?
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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #8 on: April 19, 2020, 08:07:49 PM »
http://gosportwx.com/wxwu-history.php looks ok to me... what issue are you seeing that am I missing?

Just them error logs, if it pops back up I'll let ya know. because it came up before and after updating the script..
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #9 on: April 19, 2020, 08:08:35 PM »
And after I said that they come back up

[19-Apr-2020 20:07:31 America/Indiana/Indianapolis] PHP Warning:  A non-numeric value encountered in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1237
[19-Apr-2020 20:07:31 America/Indiana/Indianapolis] PHP Warning:  A non-numeric value encountered in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1237
[19-Apr-2020 20:07:31 America/Indiana/Indianapolis] PHP Warning:  A non-numeric value encountered in /home/hj2ke8lfpx43/public_html/WU-History-inc.php on line 1237

this is what is on line 1237          $tot = $tot + $arr[$row][$col];
« Last Edit: April 19, 2020, 08:10:07 PM by mkutche »
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #10 on: April 19, 2020, 08:28:25 PM »
That's a data-value issue, I think. .. is your line 1237 in the wind_stats() function, or if not, which function is the error line in.
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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #11 on: April 19, 2020, 08:31:02 PM »
That's a data-value issue, I think. .. is your line 1237 in the wind_stats() function, or if not, which function is the error line in.

just shows this for line 1237 idk? $tot = $tot + $arr[$row][$col];
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #12 on: April 19, 2020, 09:35:38 PM »
I'd suggest changing lines 1235-1240
Code: [Select]
//if ($arr[$row][$col] != 0) {   // Suggestion by Paul Gogan
$num++;
$tot = $tot + $arr[$row][$col];
if ($arr[$row][$col] > $hi) $hi=$arr[$row][$col];
if ($arr[$row][$col] < $lo) $lo=$arr[$row][$col];
//}
to
Code: [Select]
if (is_numeric($arr[$row][$col])) {
$num++;
$tot = $tot + $arr[$row][$col];
if ($arr[$row][$col] > $hi) $hi=$arr[$row][$col];
if ($arr[$row][$col] < $lo) $lo=$arr[$row][$col];
}
« Last Edit: April 19, 2020, 09:38:23 PM by saratogaWX »
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 mkutche

  • Forecaster
  • *****
  • Posts: 1043
    • GosportWx.com
Re: WU-History-Inc errors
« Reply #13 on: April 19, 2020, 10:18:14 PM »
I'd suggest changing lines 1235-1240
Code: [Select]
//if ($arr[$row][$col] != 0) {   // Suggestion by Paul Gogan
$num++;
$tot = $tot + $arr[$row][$col];
if ($arr[$row][$col] > $hi) $hi=$arr[$row][$col];
if ($arr[$row][$col] < $lo) $lo=$arr[$row][$col];
//}
to
Code: [Select]
if (is_numeric($arr[$row][$col])) {
$num++;
$tot = $tot + $arr[$row][$col];
if ($arr[$row][$col] > $hi) $hi=$arr[$row][$col];
if ($arr[$row][$col] < $lo) $lo=$arr[$row][$col];
}

ok done i'll let ya kno if it generates an error again.
Mike K.
Davis Vantage Vue 6250 - CumulusMX (3.21.1-b3205)
Gosport, Indiana
Gosportwx.com twitter.com/GosportINWX
-----------------------------------------------------------

Offline btrip

  • Member
  • *
  • Posts: 6
    • South West Weather
Re: WU-History-Inc errors
« Reply #14 on: April 20, 2020, 10:50:07 AM »
Hi I have this error [20-Apr-2020 07:39:43 America/Phoenix] PHP Notice:  A non well formed numeric value encountered in /home/btrip/public_html/wx/WU-History-inc.php on line 1393

This is line 1393 $newdate = mktime (0,0,0,$month,$nday,$year); in WU-History-inc.php

Thanks
BTrip
B.Trip
DavisVP2/ Serial Data Logger, HP EliteDesk 800 G2 Mini / Intel Core i5, 16GB Ram, OS Windowa 10
Youngtown, Arizona

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #15 on: April 20, 2020, 11:33:04 AM »
That line is in
Code: [Select]
function AddDate ( $month, $day, $year, $numdays) {
$nday = $day + $numdays;
$newdate = mktime (0,0,0,$month,$nday,$year);
return getdate($newdate);
}
which is called by the following lines:

   Line 383:    $ndate = AddDate($mo, $da, $yr, -1);
   Line 386:    $ndate = AddDate($mo, $da, $yr, -7);
   Line 389:    $ndate = AddDate($mo, $da, $yr, -30);
   Line 392:    $ndate = AddDate($mo, $da, $yr, -365);
   Line 471:    $ndate = AddDate($mo, $da, $yr, +1);
   Line 474:    $ndate = AddDate($mo, $da, $yr, +7);
   Line 477:    $ndate = AddDate($mo, $da, $yr, +30);
   Line 480:    $ndate = AddDate($mo, $da, $yr, +365);
   Line 1004:    $tdate = AddDate($pmo, $pda, $pyr, 0); // just to get the name of the day

With the data you provided, I can't tell which of those may have been the issue.. sorry.
Do you have the access_log for the page showing the URL used (with the arguments) for 20-Apr-2020 07:39:43 ? I'd need to see that to debug further.
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 btrip

  • Member
  • *
  • Posts: 6
    • South West Weather
Re: WU-History-Inc errors
« Reply #16 on: April 20, 2020, 11:58:07 AM »
Hi I have attach a copy of the server error log (Go Daddy). This is the URL to the WU History page https://southwestweather.com/wx/wxwuhistory.php.

Thanks
BTrip
B.Trip
DavisVP2/ Serial Data Logger, HP EliteDesk 800 G2 Mini / Intel Core i5, 16GB Ram, OS Windowa 10
Youngtown, Arizona

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9297
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: WU-History-Inc errors
« Reply #17 on: April 20, 2020, 12:59:15 PM »
Thanks, but that doesn't show the causing URL.. it's in the access_log
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 btrip

  • Member
  • *
  • Posts: 6
    • South West Weather
Re: WU-History-Inc errors
« Reply #18 on: April 20, 2020, 04:28:23 PM »
Hi I think this is the correct log accesslog_southwestweather.com


BTrip
B.Trip
DavisVP2/ Serial Data Logger, HP EliteDesk 800 G2 Mini / Intel Core i5, 16GB Ram, OS Windowa 10
Youngtown, Arizona

 

anything