Hi,
With the latest versions of Cumuluswebtags.txt the processed PHP file gives an error;
Parse error: syntax error, unexpected ',' in /../cumuluswebtags.php on line 48
I had to go back to a couple versions ago to actually process and read the PHP file. For some reasons somethings changed with the interpretation with "," Or am I missing the big picture here?
Grtz, Paul
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025
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
If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080
Error in processed cumuluswebtags.php
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Error in processed cumuluswebtags.php
I think we'd need to see a copy of line 48 (and a few surrounding lines) to see what the problem is.
-
ninendal
- Posts: 14
- Joined: Sun 04 Jul 2010 7:29 pm
- Weather Station: Davis vantage pro2
- Operating System: Windows 7
Re: Error in processed cumuluswebtags.php
Hi, not able to reproduce this atm. I was wondering if this was usable to get some more info then the realtime.txt file and reuse it on my site in combination with some ajax rotation. I didn't succeed in it. Now searching for other waysmcrossley wrote:I think we'd need to see a copy of line 48 (and a few surrounding lines) to see what the problem is.
- beteljuice
- Posts: 3292
- Joined: Tue 09 Dec 2008 1:37 pm
- Weather Station: None !
- Operating System: W10 - Threadripper 16core, etc
- Location: Dudley, West Midlands, UK
Re: Error in processed cumuluswebtags.php
That's its entire purpose !I was wondering if this was usable to get some more info then the realtime.txt file and reuse it on my site in combination with some ajax rotation.
......................Imagine, what you will KNOW tomorrow !
-
ninendal
- Posts: 14
- Joined: Sun 04 Jul 2010 7:29 pm
- Weather Station: Davis vantage pro2
- Operating System: Windows 7
Re: Error in processed cumuluswebtags.php
Hi Marc,mcrossley wrote:I think we'd need to see a copy of line 48 (and a few surrounding lines) to see what the problem is.
This is the output of the processed file. The error is Parse error: syntax error, unexpected ',' in /../cumuluswebtags.php on line 52
50 # List of all Cumulus web tags assigned as PHP variables
51 $AllocatedMemory='98,99 MB';
52 $altimeterpressure=1022,59;
53 $altitude='2 m';
..$apptemp=16,8;
..$apptempH=20,7;
..$apptempL=2,2;
..$apptempTH=19,8;
..$apptempTL=4,4;
..$apptempYH=13,0;
..$apptempYL=3,5;
..$avgbearing=243;
..$avgtemp=12,3;
..$avgtempY=9,8;
..$battery='4,75v'; // does not apply to all weather station types
..$bearing=229;
..$BearingRangeFrom=99;
..$BearingRangeFrom10=090;
..$BearingRangeTo=12;
..$BearingRangeTo10=020;
..$bearingTM=289;
..$bearingYM=53;
..$beaudesc='zwakke wind';
..$beaufort='F2';
..$beaufortnumber=2;
..$build=1099;
This is a snippet from the original text file;
# List of all Cumulus web tags assigned as PHP variables
$AllocatedMemory='<#AllocatedMemory>';
$altimeterpressure=<#altimeterpressure>;
$altitude='<#altitude>';
$apptemp=<#apptemp>;
$apptempH=<#apptempH>;
$apptempL=<#apptempL>;
Paul
- mcrossley
- Posts: 14388
- Joined: Thu 07 Jan 2010 9:44 pm
- Weather Station: Davis VP2/WLL
- Operating System: Bullseye Lite rPi
- Location: Wilmslow, Cheshire, UK
- Contact:
Re: Error in processed cumuluswebtags.php
OK, so you cannot use a comma as a decimal in PHP, so you will have to make all he values strings rather than numeric by enclosing them in quotes...
$altimeterpressure='<#altimeterpressure>';
You will then be able to print them out to a web page, but if you want to manipulate the value you will have to it into a 'dot' decimal...
$altimeterpressure=str_replace(',','.','<#altimeterpressure>');
$altimeterpressure='<#altimeterpressure>';
You will then be able to print them out to a web page, but if you want to manipulate the value you will have to it into a 'dot' decimal...
$altimeterpressure=str_replace(',','.','<#altimeterpressure>');
-
ninendal
- Posts: 14
- Joined: Sun 04 Jul 2010 7:29 pm
- Weather Station: Davis vantage pro2
- Operating System: Windows 7
Re: Error in processed cumuluswebtags.php
Thx Markmcrossley wrote:OK, so you cannot use a comma as a decimal in PHP, so you will have to make all he values strings rather than numeric by enclosing them in quotes...
$altimeterpressure='<#altimeterpressure>';
You will then be able to print them out to a web page, but if you want to manipulate the value you will have to it into a 'dot' decimal...
$altimeterpressure=str_replace(',','.','<#altimeterpressure>');