Wx3in1 Script Running on PHP 8.x?

I have been successfully running the “wx3in1” script using PHP7.4. I have migrated to PHP 8.2 and the script won’t run. Is anyone successfully running the “wx3in1” script using PHP8.x? If so, would you mind sharing your script(s) with me? I’ve spent hours trying to get it to run on PHP8.2, but no success to dat.


Hello @Breezy,

Enable error reporting in PHP to see any warnings or errors that might indicate what’s causing the script to fail.

I’m also in the same situation, I have PHP 8.3 and I get a blank page with a lot of errors that I can’t understand. Does anyone know how to do?
Thank you

Attached a QAD “upgrade” to PHP 8.2.0
I have no active WXSIM data so I downloaded some plaintext.txt and lastret.txt files.

If you have problems with this version, please add &test to the URL, it will display all error messages.

As your current version does not works with PHP 8, use this complete folder after first renaming the old script folder

Currently the scripts load the 2 WXSIM files from with the wxsim_wxall folder.
For first test copy your 2 WXSIM files also into that folder.

Then you have to check / adept all settings.

If all works OK adept the correct location of the files in wxall.settings.php

The compare with yr.no data is blocked as the scripts use the old metno-api.
If someone adapted it for the latest API, please post the zip of your version and i will include it with this version also.

The last line of the output displays the current PHP version


Moved download to another post down.

1 Like

Hello Wim,


I just changed the server folder name to “wxsim_wxall” and it works. Thank you for the update. Much appreciated.


I just tried the script with my lastret.txt and plaintext.txt files. It failed. Looking at the error messages I noticed several variables were not enclosed in single quotes. I fixed those and the script runs without error now. I’ve attached the updated wxall.lastret.php file along with my lastret.txt and plaintext.txt files.
lastret.txt (95.5 KB)
plaintext.txt (2.9 KB)

wxall.lastret.php.txt (40.3 KB)

1 Like

Updated version:
wxsim_wxall.zip (339.9 KB)

Removed all errors, warnings and messages.
Updated scripts for PHP 8.2

Updated CSS links to https for static.nordicweather.net/

But I can only test the data from sites I have visited / helped in the past.

  • The scripts heavily depends on correct and complete data.
  • The lastret.txt data should also have “on-the-hour” lines.
    All lines without :00 minutes are discarded.

If you want me to test your data, please post / sent a PM with a link for your lastret.txt and plaintext.txt.
Do not post or mail me the files. I need the URL to the files.

Hope this helps the users to continue to use this beautiful script.

Commercial :grinning: My version of a similar, albeit more dull script

Leuven v4.13 forecast scripts 2024-01-27 PHP 8.2 - HighCharts 11.3.0
wxsimD weather forecast

I minor update for sunrise-set times and icon
uopdate_sun_times.zip (29.3 KB)

How can I get more than 3 days to display in the graph? I have “topfrcam = 9;” but still only get 3 days. Am I overlooking a setting? Thanks.

Try $legendtop = “10”;

Hi SteveFritz,

No, you are not overlooking it. There is no setting for the number of days.

These are “old” scripts not accustomed to the wider screen sizes of today.
Also the size / length of the lastret,txt files vary widely.
So the script assumes the most common default setting in WXSIM for that file as it was in the early days.

Check line 455 in wxall.lastret.php. It should now reads

So the graph data will be used from the first hour up to the 74th hour.

Change that 74 to a better value for your situation maybe 96

That will look like this:



Thanks very much for this info. It’s exactly what I’ve been looking for. I went back and looked at my older wxall.lastret.php files for Wx3in1 V4.2 and V5.1 for the line you mentioned. It was in both those files with a value of 180. I must have updated this value at some point as I also found the original V5.1 code uses 72.

I updated my wxall.lastret.php file with the 180 value. It looks great and works fine. Thanks again for the pointer.


Thanks for the update. I’m still using this old version.


1 Like