Hi Wim, I am the least gifted student, who is me.
I am not sure if I can get this to work. I am not sure if the link you attached is an update of the original script to PHP 8.2.
On the other hand, if you remember the WXSIM EWN forecast that you helped me with, it did not generate the output at the exact hour. Although you modified something and managed to make it work.
I have downloaded the attached file and configured the script but I get errors on the test page
I am not sure how to proceed, with your help I am sure I can get it up and running.
This has nothing to do with PHP8.x
You already use 3 different WXSIM forecasts.
Two of them need lastret.txt with “on the hour data” .
They have adaptions to work with your “invalid” lastret.txt
The sivu2 script will only work if you adept your WXSIM settings to generate data on the hour
Your data now looks like
8:32a FAIR LIGHT FOG 12,9 12,2 12,9 12,9 12,9
9:02a P.CLOUDY LIGHT FOG 12,8 12,2 12,8 12,8 12,6
It should look like
8:00 FAIR LIGHT FOG 12,9 12,2 12,9 12,9 12,9
9:00 P.CLOUDY LIGHT FOG 12,8 12,2 12,8 12,8 12,6
You paid good money for your WXSIM licence. It has extensive read-me and a large user base.
So post a question on this forum about “How to get lastret.txt on the hour data”.If that fails ask the author Tom_Ehrensperger
Succes,
Wim
P.S. I moved your question to a separate topic.
More change to get an answer this way
Okay, I just have an email to Tom waiting to be answered. I’m going to ask him about this and see what he says. Until then, we’ll put this on hold.
I tested the sivy2.php script with your lastret.txt, but I do not get the error you have. This is the error you get.
Warning: Undefined variable $rawdata in /var/www/html/wxsim_wxall/wxall.lastret.php on line 224
Your file-location settings in wxall.settings.php point to the same folder as the scripts are in. But that lastret.txt is an old file (2024-03-28_03:00_UTC). The scripts do not get any valid data and they fail.
Your lastret and plaintext files are in the root.
Therefor line 9 and 10 in wxall.settings.php should be changed from:
$lastretfile = './lastret.txt';
$plaintextfile = './plaintext.txt';
to
$lastretfile = '../lastret.txt';
$plaintextfile = '../plaintext.txt';
Then still the “:02” minutes should be removed.
I modified the script similar to my changes for the other “old” scripts.
You can test this version, it should work if it can find the files.
Succes,
Wim
wxall.lastret.php.zip (10.8 KB)
You are great Wim, how much good you do me
https://www.meteoensevilla.es//wxsim_wxall/sivu2.php
I have modified some wxsimate options and I think I have found the issue of the hour…
I still have the translations, from the name of the file it seems to be the same as the original one from saratoga. It would be nice if this script could be configured so that the file would not have to be duplicated.
On the other hand, I don’t know if it is advisable to make an iframe for sivu2.php or on the contrary adapt the script to the saratoga pages as you have done in your wxsim leuven.
Hi Wim, I’ve spent many days and hours trying to get the accents and special characters to work in my language. I’ve been tempted to ask you but I’ve struggled and tried a thousand things until I got it working, although the º symbol has become unconfigured
I only get a warning error that may not be important but is annoying. I could remove the lines of code, but I don’t want to mess around.
The error is: Warning: Undefined variable $UTFLang in /var/www/html/wxsim_wxall/wxall.plaintext.php on line 33
I’m embarrassed to ask you for help, but I don’t know who to turn to. Thank you very much