Weather Site Status Page III

PHP/AJAX Website Template Set - Diagnostic tool The Base distribution for Canada, USA and World all contain a built-in diagnostic tool (check-fetch-times.php) to help locate problems with a Saratoga template website. The following options are available for display, base on the ?show={command} argument on the URL invoking the script.

Basic PHP Setup. Without a ?show= argument, the script will show some basic PHP setup information and attempt to check connectivity while fetching data from external websites and display the timings and success/failure of each fetch. The external websites will be automatically selected based on the template Base (Canada, USA, World) for the support scripts for forecast, advisory, UV-index. Note in the sample, there was an issue (timeout on DNS resolution for UV forecast site). This information is useful to help diagnose issues (slow page loads, missing data, etc.) with your website connectivity to the needed external websites for data.

Show Info. The ?show=info query will display information about key PHP settings, status of needed PHP functions, check for needed cURL and GD library features, test for presence and function of cache and key image/data files, and presence of the required structure/support scripts.

Show Settings. The ?show=settings query will display the contents (highlighted) of Settings.php, Settings-weather.php and if found Settings-language.php. The script will redact all API keys used by any of the support scripts built-in to the Saratoga template set. It may not automatically redact API key information from 3rd-party scripts. Seeing the PHP highlighted settings allows for easy remote debugging assistance, should it be needed.

Show Structure. The ?show=structure query will display the highlighted contents of the structure files: top.php, header.php, menubar.php, footer.php and common.php. This can be useful to remotely spot issues that may be causing website failures.

Show Weather. The ?show=wx query will display the highlighted contents of Settings-weather.php and use the $SITE['WXtags'] entry to show the contents of the weather tags file (testtags.php for Weather-Display or {WXname}tags.php+{WXname]-defs.php for other weather software).

Show Versions. The ?show=versions query is very useful to check the core scripts for your Base and Plugin against the currently-distributed version. Having a down-level script can mean loss of functionality or a fatal PHP error as external data websites and/or PHP versions change. The bottom of the page will show instructions and query information to use to fetch a complete set of needed updates. If your site has current scripts, then no additional instructions will show at the page bottom. As an aid to help folks keep the website scripts current, a new area will appear when you look at wxstatus.php on your site.. see the next item:

Wx Status. The wxstatus.php page on your site is the first place to go when you are experiencing issues with displayed-data timeliness. There you can see that the data upload and realtime upload are 'current' or not. A new feature was added to also alert you that some core script(s) need attention, with a link to get the details (via check-fetch-times.php?show=versions ) so you can easily get and install updates to your site.

Additional information is available for maintaining your website here.

Page created by Willowsford Farm Weather