Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Server Error log filled with repetitive errors

Discussion of Ken True's web site templates

Moderator: saratogaWX

Post Reply
User avatar
vpokroglo
Posts: 101
Joined: Thu 24 Feb 2011 7:45 pm
Weather Station: WS-2350
Operating System: Raspberry Pi 2
Location: Slovenija
Contact:

Server Error log filled with repetitive errors

Post by vpokroglo »

My server error log contains repetitive errors in CU-defs.php on line 81\n (82\)
Any thoughts where is the problem, because i am lost?


here are some rows of error.log:

Code: Select all

[Tue Dec 10 02:56:39.951973 2019] [lsapi:notice] [pid 1605:tid 140621892826880] [client 66.249.79.76:57815] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 02:56:39.952047 2019] [lsapi:notice] [pid 1605:tid 140621892826880] [client 66.249.79.76:57815] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 02:56:39.952066 2019] [lsapi:notice] [pid 1605:tid 140621892826880] [client 66.249.79.76:57815] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
[Tue Dec 10 02:56:39.952081 2019] [lsapi:notice] [pid 1605:tid 140621892826880] [client 66.249.79.76:57815] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
[Tue Dec 10 02:59:44.994377 2019] [lsapi:notice] [pid 1605:tid 140622077466368] [client 157.55.39.9:14749] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 02:59:44.994430 2019] [lsapi:notice] [pid 1605:tid 140622077466368] [client 157.55.39.9:14749] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 02:59:44.994452 2019] [lsapi:notice] [pid 1605:tid 140622077466368] [client 157.55.39.9:14749] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
[Tue Dec 10 02:59:44.994468 2019] [lsapi:notice] [pid 1605:tid 140622077466368] [client 157.55.39.9:14749] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
[Tue Dec 10 03:18:41.264531 2019] [lsapi:notice] [pid 23147:tid 140621708187392] [client 35.224.83.12:62351] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 03:18:41.264579 2019] [lsapi:notice] [pid 23147:tid 140621708187392] [client 35.224.83.12:62351] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 81\n
[Tue Dec 10 03:18:41.264598 2019] [lsapi:notice] [pid 23147:tid 140621708187392] [client 35.224.83.12:62351] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
[Tue Dec 10 03:18:41.264615 2019] [lsapi:notice] [pid 23147:tid 140621708187392] [client 35.224.83.12:62351] [host okroglovreme.com] Backend log: PHP Notice:  A non well formed numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82\n
Image
User avatar
saratogaWX
Posts: 1170
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: Server Error log filled with repetitive errors

Post by saratogaWX »

Those two lines

Code: Select all

if(isset($WX['RecentDewPoint m=60'])){$dewchangelasthour=$WX['dew']-$WX['RecentDewPoint m=60'];} // conditional value
if(isset($WX['RecentPressure m=60'])){$barochangelasthour=$WX['press']-$WX['RecentPressure m=60'];} // conditional value
likely have some non-numeric data in the $WX variables.

Looking at https://okroglovreme.com/CUtags.php?sce=dump shows

Code: Select all

$WX['RecentDewPoint m=60'] = '-11,8';
 $WX['RecentPressure m=60'] = '1012,5';
and

Code: Select all

$WX['dew'] = '-12,4';
$WX['press'] = '1011,7';
The non-numeric notice is caused by the decimal-comma notation for the data. PHP is expecting to process decimal-period formatted numbers.

It's a cheap hack, but you can try changing the lines to

Code: Select all

if(isset($WX['RecentDewPoint m=60'])){$dewchangelasthour=str_replace(',','.',$WX['dew'])-str_replace(',','.',$WX['RecentDewPoint m=60']);} // conditional value
if(isset($WX['RecentPressure m=60'])){$barochangelasthour=str_replace(',','.',$WX['press'])-str_replace(',','.',$WX['RecentPressure m=60']);} // conditional value
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Server Error log filled with repetitive errors

Post by mcrossley »

When running Cumulus MX, all numeric web tags also take the parameter "rc=y" to make them output dot decimals - so <#RecentDewPoint m=60 rc=y>
User avatar
vpokroglo
Posts: 101
Joined: Thu 24 Feb 2011 7:45 pm
Weather Station: WS-2350
Operating System: Raspberry Pi 2
Location: Slovenija
Contact:

Re: Server Error log filled with repetitive errors

Post by vpokroglo »

I have edited those two rows in CUtags.txt file:

Code: Select all

!RecentDewPoint m=60|<#RecentDewPoint m=60>:|:
!RecentPressure m=60|<#RecentPressure m=60>:|:
to:

Code: Select all

!RecentDewPoint m=60|<#RecentDewPoint m=60 rc=y>:|:
!RecentPressure m=60|<#RecentPressure m=60 rc=y>:|:
... but processed output is always number with decimal comma not period and wxtrends.php does not recognizes it.
Image
User avatar
vpokroglo
Posts: 101
Joined: Thu 24 Feb 2011 7:45 pm
Weather Station: WS-2350
Operating System: Raspberry Pi 2
Location: Slovenija
Contact:

Re: Server Error log filled with repetitive errors

Post by vpokroglo »

saratogaWX wrote: Wed 11 Dec 2019 4:20 pm Those two lines

Code: Select all

if(isset($WX['RecentDewPoint m=60'])){$dewchangelasthour=$WX['dew']-$WX['RecentDewPoint m=60'];} // conditional value
if(isset($WX['RecentPressure m=60'])){$barochangelasthour=$WX['press']-$WX['RecentPressure m=60'];} // conditional value
likely have some non-numeric data in the $WX variables.

Looking at https://okroglovreme.com/CUtags.php?sce=dump shows

Code: Select all

$WX['RecentDewPoint m=60'] = '-11,8';
 $WX['RecentPressure m=60'] = '1012,5';
and

Code: Select all

$WX['dew'] = '-12,4';
$WX['press'] = '1011,7';
The non-numeric notice is caused by the decimal-comma notation for the data. PHP is expecting to process decimal-period formatted numbers.

It's a cheap hack, but you can try changing the lines to

Code: Select all

if(isset($WX['RecentDewPoint m=60'])){$dewchangelasthour=str_replace(',','.',$WX['dew'])-str_replace(',','.',$WX['RecentDewPoint m=60']);} // conditional value
if(isset($WX['RecentPressure m=60'])){$barochangelasthour=str_replace(',','.',$WX['press'])-str_replace(',','.',$WX['RecentPressure m=60']);} // conditional value
Trying Ken's solution now. All is looking good for now, will see tomorrows server log...

edit: 13.12.2019 - This solution is working, no more errors-warnings in server log!
Image
Post Reply