Page 1 of 1
Error in processed cumuluswebtags.php
Posted: Thu 09 Apr 2015 3:24 pm
by ninendal
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
Re: Error in processed cumuluswebtags.php
Posted: Thu 09 Apr 2015 5:12 pm
by mcrossley
I think we'd need to see a copy of line 48 (and a few surrounding lines) to see what the problem is.
Re: Error in processed cumuluswebtags.php
Posted: Fri 10 Apr 2015 4:36 am
by ninendal
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.
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 ways

Re: Error in processed cumuluswebtags.php
Posted: Fri 10 Apr 2015 9:35 am
by beteljuice
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.
That's its entire purpose !
Re: Error in processed cumuluswebtags.php
Posted: Tue 14 Apr 2015 3:26 pm
by ninendal
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.
Hi Marc,
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
Re: Error in processed cumuluswebtags.php
Posted: Tue 14 Apr 2015 4:20 pm
by mcrossley
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>');
Re: Error in processed cumuluswebtags.php
Posted: Tue 14 Apr 2015 6:04 pm
by ninendal
mcrossley 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>');
Thx Mark
