Hello.
I have tried to change my webpage to php 8.x, but get the following fatal error:
[codeFatal error: Uncaught DivisionByZeroError: Division by zero in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php:372 Stack trace: #0 /home/okroglov/domains/okroglovreme.com/public_html/CUtags.php(747): include_once() #1 /home/okroglov/domains/okroglovreme.com/public_html/top.php(81): include_once('/home/okroglov/...') #2 /home/okroglov/domains/okroglovreme.com/public_html/index.php(35): include('/home/okroglov/...') #3 {main} thrown in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 372][/code]
any toughts?
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024
Legacy Cumulus 1 release 1.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 8.x fatal error
Moderator: saratogaWX
- saratogaWX
- Posts: 1211
- 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 8.x fatal error
There's a problem with your CUtags.php -- it contains:
instead of the expected data. Have Cumulus regenerate the file from CUtags.txt and upload it.
Looking at check-fetch-times.php?show=wx shows the problem. Your ?show=versions does indicate you are at current releases for all the other scripts.
Code: Select all
System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring (System.Int32 startIndex, System.Int32 length) [0x0001d] in <de882a77e7c14f8ba5d298093dde82b2>:0
at CumulusMX.TokenParser.Parse3 () [0x0007e] in <8be6f1044cfe411391a3124bdf024bf0>:0
at CumulusMX.TokenParser.ToString () [0x0002a] in <8be6f1044cfe411391a3124bdf024bf0>:0
Looking at check-fetch-times.php?show=wx shows the problem. Your ?show=versions does indicate you are at current releases for all the other scripts.
- vpokroglo
- Posts: 101
- Joined: Thu 24 Feb 2011 7:45 pm
- Weather Station: WS-2350
- Operating System: Raspberry Pi 2
- Location: Slovenija
- Contact:
Re: PHP 8.x fatal error
I have all files from template updated, including CUtags.txt. When changing to PHP 8.x I got following error:
Code: Select all
Warning: A non-numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82
Warning: A non-numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 82
Warning: A non-numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 83
Warning: A non-numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 83
Warning: A non-numeric value encountered in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 370
Fatal error: Uncaught DivisionByZeroError: Division by zero in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php:370 Stack trace: #0 /home/okroglov/domains/okroglovreme.com/public_html/CUtags.php(747): include_once() #1 /home/okroglov/domains/okroglovreme.com/public_html/top.php(81): include_once('/home/okroglov/...') #2 /home/okroglov/domains/okroglovreme.com/public_html/index.php(35): include('/home/okroglov/...') #3 {main} thrown in /home/okroglov/domains/okroglovreme.com/public_html/CU-defs.php on line 370
- saratogaWX
- Posts: 1211
- 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 8.x fatal error
The warning messages are due to your default format for numbers to use comma-format instead of the expected decimal/point-format for your CUtags.php.
Likewise, the UV value of '0,0' is causing the fatal error, which would not happen if the value was '0.0'
Likewise, the UV value of '0,0' is causing the fatal error, which would not happen if the value was '0.0'
- mcrossley
- Posts: 12839
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: PHP 8.x fatal error
Sounds like your template file for CU-defs.php needs to use the web tag option to use decimal "dot". For example...
<#temp> => 16,3
<#temp rc=y> => 16.3
<#temp> => 16,3
<#temp rc=y> => 16.3
- saratogaWX
- Posts: 1211
- 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 8.x fatal error
Is there a .ini setting that can force decimal dot for all processed web tags?