Author Topic: Error Log Entries  (Read 155 times)

0 Members and 1 Guest are viewing this topic.

Offline Stryder87

  • Senior Member
  • **
  • Posts: 64
    • Moody Weather
Error Log Entries
« on: December 07, 2018, 12:31:12 PM »
I'm seeing a new batch of errors in my error log and I'm wondering if there is some adjustments I need to make to the indicated files?  None of the files mentioned looked like I needed to update them, so I'm not sure what is wrong.

Sorry for the incoming wall of text...  :oops:

These are the lines:
PHP Warning:  A non-numeric value encountered in /home/.../public_html/AWNtags.php on line 445
PHP Warning:  A non-numeric value encountered in /home/.../public_html/AWNtags.php on line 496
PHP Warning:  A non-numeric value encountered in /home/.../public_html/AWNtags.php on line 507
PHP Warning:  A non-numeric value encountered in /home/.../public_html/AWNtags.php on line 695
PHP Warning:  A non-numeric value encountered in /home/.../public_html/AWNtags.php on line 696

PHP Notice:  Undefined offset: 1 in /home/.../public_html/AWN-defs.php on line 533
PHP Notice:  Undefined offset: 1 in /home/.../public_html/ajax-dashboard.php on line 1197

PHP Notice:  Undefined variable: VPuv in /home/.../public_html/ajax-gizmo.php on line 206
PHP Notice:  Undefined variable: VPuv in /home/.../public_html/ajax-gizmo.php on line 208

PHP Notice:  Undefined variable: VPuv in /home/.../public_html/ajax-dashboard.php on line 891
PHP Notice:  Undefined variable: VPuv in /home/.../public_html/ajax-dashboard.php on line 894
PHP Notice:  Undefined variable: VPsolar in /home/.../public_html/ajax-dashboard.php on line 928
PHP Notice:  Undefined variable: VPsolar in /home/.../public_html/ajax-dashboard.php on line 928

PHP Notice:  Undefined variable: date_year in /home/d6bsim7o954q/public_html/ajax-dashboard.php on line 309
PHP Notice:  Undefined variable: date_month in /home/.../public_html/ajax-dashboard.php on line 309
PHP Notice:  Undefined variable: date_day in /home/.../public_html/ajax-dashboard.php on line 309
PHP Notice:  Undefined variable: time_hour in /home/.../public_html/ajax-dashboard.php on line 309
PHP Notice:  Undefined variable: time_minute in /home/.../public_html/ajax-dashboard.php on line 309
PHP Notice:  Undefined variable: monthname in /home/.../public_html/ajax-dashboard.php on line 311
PHP Notice:  Undefined variable: dayname in /home/.../public_html/ajax-dashboard.php on line 312
PHP Notice:  Undefined variable: temperature in /home/.../public_html/ajax-dashboard.php on line 328
PHP Notice:  Undefined variable: date in /home/.../public_html/ajax-dashboard.php on line 338
PHP Notice:  Undefined offset: 2 in /home/.../public_html/ajax-dashboard.php on line 1176
PHP Notice:  Undefined offset: 2 in /home/.../public_html/ajax-dashboard.php on line 1177
PHP Notice:  Undefined offset: 1 in /home/.../public_html/ajax-dashboard.php on line 1179
PHP Notice:  Undefined variable: time in /home/.../public_html/ajax-dashboard.php on line 338
PHP Notice:  Undefined variable: iconnumber in /home/.../public_html/ajax-dashboard.php on line 367
PHP Notice:  Undefined index:  in /home/.../public_html/ajax-dashboard.php on line 1285
PHP Notice:  Undefined variable: Currentsolardescription in /home/.../public_html/ajax-dashboard.php on line 368
PHP Notice:  Undefined variable: temperature in /home/.../public_html/ajax-dashboard.php on line 380
PHP Notice:  Undefined variable: maxtemp in /home/.../public_html/ajax-dashboard.php on line 381
PHP Notice:  Undefined variable: mintemp in /home/.../public_html/ajax-dashboard.php on line 381
PHP Notice:  Undefined variable: beaufortnum in /home/.../public_html/ajax-dashboard.php on line 517
PHP Notice:  Undefined variable: bftspeedtext in /home/.../public_html/ajax-dashboard.php on line 518
PHP Notice:  Undefined variable: dayrn in /home/.../public_html/ajax-dashboard.php on line 590
PHP Notice:  Undefined offset: 1 in /home/.../public_html/ajax-dashboard.php on line 1197
PHP Notice:  Undefined variable: currentrainratehr in /home/.../public_html/ajax-dashboard.php on line 598
PHP Notice:  Undefined variable: monthrn in /home/.../public_html/ajax-dashboard.php on line 624
PHP Notice:  Undefined variable: yearrn in /home/.../public_html/ajax-dashboard.php on line 632
PHP Notice:  Undefined variable: humidity in /home/.../public_html/ajax-dashboard.php on line 696
PHP Notice:  Undefined variable: dewpt in /home/.../public_html/ajax-dashboard.php on line 719
PHP Notice:  Undefined variable: baro in /home/.../public_html/ajax-dashboard.php on line 740
PHP Notice:  Undefined variable: pressuretrendname in /home/.../public_html/ajax-dashboard.php on line 765

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6879
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log Entries
« Reply #1 on: December 07, 2018, 01:21:34 PM »
Wow.. that's quite a bit of Notice errata.

The first group is due to incomplete data from Ambientweather.net for your station, as is the last group (the JSON retrieval must have failed, so the ajax-dashboard had incomplete definitions from AWN-defs.php due to that incomplete data.

Your UV data appears to be always zero.. I don't think you have a UV sensor on your station, so you should change Settings-weather.php
Code: [Select]
$SITE['UV']           = true;  // set to =false if no UV sensor
to
Code: [Select]
$SITE['UV']           = false;  // set to =false if no UV sensor
so the ajax-gizmo will not try to display UV data.

Are these errata appearing in the error_log all the time, or just occasionally?
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 Stryder87

  • Senior Member
  • **
  • Posts: 64
    • Moody Weather
Re: Error Log Entries
« Reply #2 on: December 07, 2018, 02:12:29 PM »
Actually, my station (WS-2902A) does have a UV sensor.  The inside console displays everything fine.

They show pretty much every day, about 2-3 times, with the last 2-3 days it showing up about 6-7 times a day.

I deleted the log file on Nov 29 to give me a clearer idea of what was happening, so my current one is only from Nov 30.  If you like, I could PM you the log to look through.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6879
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log Entries
« Reply #3 on: December 07, 2018, 02:23:35 PM »
As I said, the problem (and error_log entries) happen when there was an issue getting the JSON data from Ambientweather.net -- without data, a lot of the code will report Notice type errata.  I suggest you tune your error reporting to exclude Notice errata to leave your error_log for reporting only serious errors.
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 Stryder87

  • Senior Member
  • **
  • Posts: 64
    • Moody Weather
Re: Error Log Entries
« Reply #4 on: December 07, 2018, 02:40:47 PM »
Changing the reporting level makes sense.  Is the error data coming from GoDaddy itself?  I recall seeing a section in the PHP settings about error reporting (E_ALL, ~E_ALL and something else), or is it in a setting file on the web site?  For some reason I could have sworn you had me change it before, but I guess not if all these notices are showing up.


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6879
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log Entries
« Reply #5 on: December 07, 2018, 03:32:52 PM »
In your php.ini you can put
Code: [Select]
error_reporting = E_ALL & ~E_NOTICE
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 Stryder87

  • Senior Member
  • **
  • Posts: 64
    • Moody Weather
Re: Error Log Entries
« Reply #6 on: December 07, 2018, 04:27:58 PM »
Well that's odd.  That's what it already is.
Strange....

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6879
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log Entries
« Reply #7 on: December 07, 2018, 06:23:43 PM »
You may have a cPanel setting for PHP version that also includes a setting for error reporting .. check there.

Yes.. I just found it on my GoDaddy cPanel site.  Under PHP Versions, click the link at the upper right for PHP Options.

There you can set error_reporting and use

E_ALL & ~E_NOTICE

as the setting. and press Save to engage it.
« Last Edit: December 07, 2018, 06:39:21 PM by saratogaWX »
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 Stryder87

  • Senior Member
  • **
  • Posts: 64
    • Moody Weather
Re: Error Log Entries
« Reply #8 on: December 08, 2018, 12:37:02 PM »
Ok, I changed it in CPanel as well.  Hopefully that calms the error messages down a bit.  haha

Out of curiosity... what do those different switches mean?

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6879
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Error Log Entries
« Reply #9 on: December 08, 2018, 12:57:33 PM »
Yes, you can do the same change to include-style-switcher.php and see if that helps.

Somewhere in the set of files: Settings.php, Settings-weather.php, AWNtags.php, AWN-defs.php, common.php, include-style-switcher.php there is a rogue space or UTF-8 marker before the starting <?php or after the ending ?> that is causing the header to be emitted by PHP and thus the
Quote
<br />
<b>Warning</b>:  session_start(): Cannot start session when headers already sent in <b>/home/d6bsim7o954q/public_html/include-style-switcher.php</b> on line <b>31</b><br />
error in the log file.

Which switches in the Options in cPanel do you mean?  The error_reporting switches?  If so, see the PHP doc on error_reporting.
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