Some help with finding pwsWD problems, read before posting

I will add more readme-text and test-scripts to this topic so that you can do a lot of checking and find the problems without having to post.


At the top the latest versions of the scripts you will use finding the cause of a problem. Install them now before you run into a problem and forgot where the latest version can be found.
_test_php_2025-05-04.zip (1.4 KB)
PWS_listfile-2025-05-04.zip (2.4 KB)


Why this topic / discussion?


If something fails when installing the dashboard, when upgrading PHP or when “nothing has changed but it does not work anymore”
→ you could often find the cause of the problems yourself

The examples below use “./pwsWD/” als the folder-name, adept the links to your own configuration.


#1 ./pwsWD/startHere.php


This script is automatically started during first time install to do some basic settings.
It checks if the needed parts of PHP are installed, if external files can be downloaded a.s.o.

You should re-run it when having a problem: Sometimes a new PHP version has a different configuration and some essential parts are missing.
Or the provider switched off accessing adjacent folders


#2 ./pwsWD/_test.php


This script is a replacement for index.php and switches full error-reporting on. No other changes are made.

If the main part of the dashboard contains a lot of extra texts or messages, there is a some work to do for you.

Make a note of the blocks with extra texts to do more extensive testing later on.

Remark: The footer contains also a lot of extra texts.
Those are not “errors or warnings” but information messages about the loading of the files. If you see words like “warning” or “error” in the footer block also continue to # 4


#3 Click the coloured exclamation mark in the footer


If the footer contains a red (or orange) small ? or ! or V, there has is a problem with outdated (external) files

Click on the coloured part and make a note of the “outdated” files.
It can be files you decided “not used anymore” . F.i. you switched from Aeris to WU for your forecast.

If it is only a “not used anymore” situation:
Use your FTP program/tool to delete the file ./pwsWD/_my_settings/_status.arr
That file contains most important (external) data-sets used.
After deling that file, it will be rebuild within 24 hours and only contain links to files used.

If there are other problems with files also continue with # 4


#4 ./pwsWD /PWS_module_test.php → Bottom button “Load files”


Clicking this button will load all external files using full error-reporting.

If there are messages pointing to a problem: check the obvious causes

  1. Invalid API-key, area-code, airport code, lat-lon
  2. Try to run the URL with the problem within your browser and see what messages are returned in detail
  3. If the target site is not available, check other or demo sites if the can not reach that site also. This happens f.i. if the METAR site or an AQ-site is off-line
  4. If there are still problems, f.i. from #2 which points to certain data, but there are no errors in this step, you have to check the contents of the returned data in step #5

#5 ./pwsWD /PWS_module_test.php → Middle row left button “List contents”


First of all, there can be a large amount of outdated files in the dropdown.
They are created when switching from forecast supplier or allowing every language in your dashboard a.s.o.
So less is more, after all problems are solved go to #99 and delete unneeded and outdated files in the ./pwsWD/jsondata/ folder.

Now try to find the recent file with problems in the selector.

  1. As an example, select f.i. jsondata/luftdaten.txt
  2. Click on list contents and the contents of the file is displayed, default in “plain-text” format.
  3. A problem message from the data-supplier one can normally read.
  4. If you want to check the contents, you can click one of the formats after Expand this file as:

Most files are stored in formats php-array or json_encoded


#6 Test one problem block at a time in ./pwsWD /PWS_module_test.php


You found some text messages inside your blocks in step #2.
It is not easy to read those, so better test each block separately by selecting them in the first row of selectors.

The warning/error messages and debug information will be printed.
The block contents is shown in the “unformatted” way AKA no CSS is used.

The problem should be obvious.
If you can not explain the problem, post the information on weather-watch:

  1. Make a screenshot of the contents and

  2. Please try to add all information.

  3. Try to post all recent changes such as “new provider” “new PHP level” “new website” “new data file”, anything which can be remotely the cause of the problem.

Even if you think it can not be you which is the cause of a problem,
DO NOT mention in your post “I did not change anything, so it can not be my fault”
Doing so it implies it is me who is the cause, and i do not like that at all.


#10 Other tests in ./pwsWD /PWS_module_test.php


The “List contents button” default it displays your (primary) weather-data file.
It can not display files outside the “scope” of your ./pwsWD/ folder.
Security forbids browsing the complete website-folder tree.
If your primary data is using “../other_folder/mydata.txt” you can not check the contents the easy way. You have to use your FTP program.

The “Show station values” shows the items used from your (primary) weather-data file

The button “Live data values” shows all data items used from all weather-data files.

If you have strange values in your dashboard, please check if these strange values are in the “Live data values” list displayed.

The item “[loaded from]” displays the data files used. One can have a primary file, a snow file, one or more extra-data files.

If you see more than 1 file listed, please check the contents of those extra files using the middle row left button “List contents” or your FTP program.


I will add more to this list so that you can do a lot of checking and find the problems without having to post.

Succes,
Wim

Version 2025-05-04 15:00 CEST

1 Like

Empty topic for future use, it sometimes happens that the first message of a topic can not be changed after to many changes.

Also install the updates
Either from the first post or from the list of updated scripts after October 31, 2023