Page 1 of 1

PHP errors with php 7.3.7 - the next step

Posted: Fri 22 Nov 2019 7:58 am
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?)

Re: PHP errors with php 7.3.7 - the next step

Posted: Fri 22 Nov 2019 6:37 pm
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.

Re: PHP errors with php 7.3.7 - the next step

Posted: Fri 22 Nov 2019 7:21 pm
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.

Re: PHP errors with php 7.3.7 - the next step

Posted: Sat 23 Nov 2019 4:36 am
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

Re: PHP errors with php 7.3.7 - the next step

Posted: Sat 23 Nov 2019 8:15 am
by HansR
Ok, thnx!
You're just ahead of me, did not even check the logfile. Glad it's fixed.
Best regards, Hans