WXSIM "EWN-style"

Hi
I finally got it showing something but the low temps on the top half of screen show as 0 instead of the values in the bottom half of the screen

http://www.hc-iom.co.uk/wxsim2/forecast.php

if there something I have missed

Harold

Hennka,
Latest version working. Rain graph in inches is much better.
Only thing I see is in overview rain still isn’t right but rain on table is good.
You can see it here: http://www.shermanctweather.org/ewntest/wxsim/forecast.php
Thanks,
Tom

Henkka,

I have now downloaded your latest version and turned off error reporting. No change :frowning:

When I only run data.php, what I get is what you see in the attached file.


data.txt (49 KB)

Henkka,

I have one issue and one question after installing the latest update. The issue I have is that the Barometer reading in the Table section shows “hPa” instead of “inHg” that I have defined in $uoms.

The question I have has is about the day/date in the carousel. Is there any way to change the format of the date? For example, Monday currently shows as “Monday 27.02”. I’d prefer this to read “Monday 2/27” or even “Monday, Feb 27”. Is it possible to provide this ability?

Thanks,

Steve

Henkka,

After a lot of tracing I see that it stops with json error 7 from json_encode. I really don’t know how to find out what causes it…

Is anyone interested in fixed units (especially the wind)? I modified the script, so that it fits my needs now (also no possibility to change the units) . If Henkka doesn

Possible bug?

With the new version Tom released today, data.php won

I loaded new version of Wxsim and my forecast still works.
Tom

I have tried finding out why it failes, but I’m not a json experst, so I’m afraid that I have to give up on this :frowning:

Hi runarbg,
I would envisage that since the WXSIM upgrade something has changed in your wret.exe
Make sure all your settings are correct, I also noticed that you must not have UV checked in Wret.exe as UV is only displayed in your plaintext.txt on the Overview and not on the Tables which is obtained from Lastret.txt (ex wret.exe) I see many others in the same state…
Kind Regards,

runarbg,
Hmmm…what PHP-version do have in use?

Make sure all your settings are correct, I also noticed that you must not have UV checked in Wret.exe as UV is only displayed in your plaintext.txt on the Overview and not on the Tables which is obtained from Lastret.txt (ex wret.exe) I see many others in the same state..

The important in parsing lastret.txt are that the header-line are on “correct line”. The script looks up the needed variable-positions so extra variables in the data should not affect.

It also does not work if I use the files that comes from Henkka with the program?

I’m using V7.0

I had to go back to php Ver 5.6 from ver.7 to get it working.
Tom

I have just set this up and put it live on my weather site. Thanks Henkka for this. It is great!!

Very easy to set up and it works out of the box.

http://www.brantfordweather.ca/html/kennedy.php

Gary

Hello Henkka,

I’ve tried to install your latest WXSIM script (which looks fabulous!!) on my weather site.

Unfortunately, it doesn’t quite work, for some reason only the Overview is populated but no forecast and no other tabs. At first I thought it was my data file, but it doesn’t work even with the original distribution. I’ve only changed the two paths in config.php to match my ISP:

$path_to_langfiles = “/home/REDACTED/celinmeteo.com/WXSIM_2017original/lang/”;
$path_to_lastret = “/home/REDACTED/celinmeteo.com/WXSIM_2017original/wxsim/lastret.txt”;

You can see the script live at http://www.celinmeteo.com/WXSIM_2017original/forecast.php

I would appreciate any help you can provide, thank you very much in advance,
Marian

Hi Marian

Just a comment. On the paths that you show, does it really contain the URL or a username.

I am not sure of the server of the setup that you have.

Here is mine.
/home/brantfordw/public_html/lastret.txt
My lastret file is in the root of the site.

Gary

Marian, That’s the same problem that I am having!

Hi guys,

Just a comment. On the paths that you show, does it really contain the URL or a username.

Its the “full path” from server root. I use it as, once get to use it, its easier and gets allways right. And, ie. cronjobs need it. So i use it everywhere.

PHP7…
I guess this can be one reason for the issues seen. Need to test it more on a PHP7-setup. At least when i installed PHP7 on my cPanel-server had i to choose every PHP-plugin what wanted to be installed. Took a couple of re-runs of the install before i got all needed added. It would not suprise me at all if it is just a missing PHP7-plugin what cause it.

One thing what maybe would show the problem what runarbg and M.P.C. see are of course PHP error_log or Apache error_log.

Yes, it is the absolute path to the files (which includes the username on the hosting server), not the URL. And you’re right, there are errors in php.log:

[12-Mar-2017 15:14:53 UTC] PHP Warning: max(): When only one parameter is given, it must be an array in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 175
[12-Mar-2017 15:14:53 UTC] PHP Warning: min(): When only one parameter is given, it must be an array in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 176
[12-Mar-2017 15:14:53 UTC] PHP Warning: max(): When only one parameter is given, it must be an array in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 177
[12-Mar-2017 15:14:53 UTC] PHP Warning: min(): When only one parameter is given, it must be an array in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 178
[12-Mar-2017 15:14:53 UTC] PHP Warning: array_sum() expects parameter 1 to be array, null given in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 180
[12-Mar-2017 15:14:53 UTC] PHP Warning: Division by zero in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 180
[12-Mar-2017 15:14:53 UTC] PHP Warning: array_sum() expects parameter 1 to be array, null given in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 181
[12-Mar-2017 15:14:53 UTC] PHP Warning: Division by zero in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 181
[12-Mar-2017 15:14:53 UTC] PHP Warning: array_sum() expects parameter 1 to be array, null given in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 182
[12-Mar-2017 15:14:53 UTC] PHP Warning: Division by zero in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 182
[12-Mar-2017 15:14:53 UTC] PHP Warning: array_sum() expects parameter 1 to be array, null given in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 183
[12-Mar-2017 15:14:53 UTC] PHP Warning: Division by zero in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 183
[12-Mar-2017 15:14:53 UTC] PHP Warning: max(): When only one parameter is given, it must be an array in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 192
[12-Mar-2017 15:14:53 UTC] PHP Warning: array_search() expects parameter 2 to be array, null given in /home/REDACTED/celinmeteo.com/WXSIM_2017/wxsim/data.php on line 192