Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.5 (build 3282) - 23 February 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

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: 5831
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
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
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
saratogaWX
Posts: 1169
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: 5831
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
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
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
saratogaWX
Posts: 1169
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: 5831
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
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
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Post Reply