Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.11.4 (build 3133) - 25 May 2021 (please see announcement regarding releases since 3.5.0)
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

PHP errors with php 7.3.7 - the next step

Discussion of the Weather34 web site template

Moderators: saratogaWX, weatherist34

Post Reply
User avatar
HansR
Posts: 2145
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

PHP errors with php 7.3.7 - the next step

Post by HansR »

Hi, In another thread I had a PHP error 1071 error from the apache log file and we could pinpoint the cause and solve it. However, there are still some of those errors and the cause seems to be different so I continue my quest to empty the error log :)

Code: Select all

PHP Notice:  A non well formed numeric value encountered in /var/www/clients/client13104/web75415/web/CU-HWS-master/mooninfo.php on line 194
The same on lines 198, 202, 206, 210.

This is much more complex and difficult to locate. Could you shed a light on this one? (and fix it in the template?)
Hans

https://meteo-wagenborgen.nl
Cumulus build 3132 ● Davis Vantage Pro 2+ ● RPi 3B+ ● Raspbian 5.10.17-v7+ ● Mono 5.18.0.240

User avatar
saratogaWX
Posts: 1077
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: PHP errors with php 7.3.7 - the next step

Post by saratogaWX »

Your description about which 'template' is a bit sketchy. Since the error message included the CU-HWS-master in the path, I'm guessing that it's my distribution of Brian Underdown's PWS template from https://github.com/ktrue/CU-HWS .. if that's correct, and the mooninfo.php referred to in the error message aligns with lines that contain code like line 194

Code: Select all

else if  ($sunrotate <17.01 ) echo "${sunrotate} . ${minutesagosunrise} " *13;else if  ($sunrotate >17 ) echo "${sunrotate} . ${minutesagosunrise} " *14;?>deg);?>deg);
and the other cited lines have similar structure.

My guess is that the

Code: Select all

echo "${sunrotate} . ${minutesagosunrise} " *13
is the cause. You might try globally replacing

Code: Select all

 "${sunrotate} . ${minutesagosunrise} "
with

Code: Select all

 "${sunrotate}.${minutesagosunrise}"
in the script and see if that eliminates the 'non well formed numeric value' messages.

User avatar
HansR
Posts: 2145
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: PHP errors with php 7.3.7 - the next step

Post by HansR »

saratogaWX wrote:
Fri 22 Nov 2019 6:37 pm
Your description about which 'template' is a bit sketchy. Since the error message included the CU-HWS-master in the path, I'm guessing that it's my distribution of Brian Underdown's PWS template from https://github.com/ktrue/CU-HWS ..
Correct. I thought the board I posted the message would be self explaining. Sorry for that.

I will try your suggestion and report back.
Hans

https://meteo-wagenborgen.nl
Cumulus build 3132 ● Davis Vantage Pro 2+ ● RPi 3B+ ● Raspbian 5.10.17-v7+ ● Mono 5.18.0.240

User avatar
saratogaWX
Posts: 1077
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: PHP errors with php 7.3.7 - the next step

Post by saratogaWX »

I tried the above fix on my local copy, and it did eliminate those Notice: errata for mooninfo.php -- I pushed the changes to the GitHub master distribution.

Best regards,
Ken

User avatar
HansR
Posts: 2145
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: PHP errors with php 7.3.7 - the next step

Post by HansR »

Ok, thnx!
You're just ahead of me, did not even check the logfile. Glad it's fixed.
Best regards, Hans
Hans

https://meteo-wagenborgen.nl
Cumulus build 3132 ● Davis Vantage Pro 2+ ● RPi 3B+ ● Raspbian 5.10.17-v7+ ● Mono 5.18.0.240

Post Reply