Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.1 (build 3096) - 31 October 2020 (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 the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

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: 1536
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?)
https://meteo-wagenborgen.nl / Cumulus 3.9.1 (build: 3096)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l
Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:21:54 UTC 2020)

User avatar
saratogaWX
Posts: 1038
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: 1536
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.
https://meteo-wagenborgen.nl / Cumulus 3.9.1 (build: 3096)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l
Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:21:54 UTC 2020)

User avatar
saratogaWX
Posts: 1038
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: 1536
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
https://meteo-wagenborgen.nl / Cumulus 3.9.1 (build: 3096)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.51-v7+ armv7l
Mono JIT compiler version 6.12.0.90 (tarball Fri Sep 4 14:21:54 UTC 2020)

Post Reply