Have two error messages in the log, see error_log.png.
One concerns the “advisory_c_small” block, which also keeps running without giving a result. The error message then refers to the file “wrnWarningEU-CAP.php” line 153.
See screenshot.
The other error comes from the “PWS_quakes_load.php” block and then lines 59 and 62, see also the error_log here.
That seems to be a severe error. I can not replicate it with NL011, NL11 or BE004 as warning area.
What is / are the warning areas in your settings?
I need those to further test.
Sometimes the .cap file contains large amounts of duplicate entires.
If the problem persists (with one area also) you could switch to one of the other EU warning settings
Lines 6-7 in wrnWarningEU.php can be set to use CAP (which you are not using, ATOM or RSS.
The output is different for those 3 versions, but usable.
The other error comes from the "PWS_quakes_load.php" block and then lines 59 and 62, see also the error_log here.
. . . l/pwsWD/_test.php?test=PWS_quakes_load.php&json&force
This switches error reporting on and reloads the xml.
When I test it locally with PHP 8.1.1 there are no errors in the log and both the xml and json seems OK
It could have been a one-time only set of erros caused by mal-formed xml.
I will test it a few times the coming days to see if the problem persists.
It found out that it has something to do with the PHP version, I went now back from 8.1 to 7.4 and the problem has gone with the advisory_c_small block (I used the latest one from 26 feb).
But why?
I use NL015
Settings in wrnWarningEU.php:
[i]<?php $scrpt_vrsn_dt = ‘wrnWarningEU.php|09|2021-08-03|’; # new / old formatstimout to 10 seconds | release 2012_lts
These are the scripts to use for the meteoalarm.org website
Be warned that you have to find the new area codes, visit the wwforum topic
#$script = ‘wrnWarningEU-RSS.php’; // old fashined feed
#$script = ‘wrnWarningEU-ATOM.php’; // use this one if both others fail
$script = ‘wrnWarningEU-CAP.php’; // latest version
#$script = false; // if you do not comment this line the meteoalarm.eu script is used
More testing done. Problem 1:
The warning-feed for NL015 (Netherlands) is really big. And, currently, contains only irrelevant data.
Total 5534 messages of which 287 for NL015 of which 0 (zero) of any importance.
The warning-feed for BE004 (Belgium) has 24 messages, all relevant but none for the BE004 area.
Problem 2:
Due to the size and thew slow server-speed there could be time-outs
=> adapted the script to change transfer time-out from 10 to 20 seconds
Problem 3:
Due to the large file-size your server-max memory limit is set to low.
It is now set (in your PH8.1 version ) at 32MB but with this file-size it needs 99.39 mb(104218624 bytes). Probably it is a higher memory setting with PHP 7.
Use your "c-panel " at your hosting site to check the memory allowed. Set it to 128 mb.
If there are more PHP 8 versions test those also. Sometimes an error occurs only in 1 version
The wrnWarningEU-CAP.php script will continue to fail (PHP 8.1) without the adequate memory size-setting for as long as that file is that big.
Hi,
I’m getting these errors on newquayweather.mobi is this the same issue
[28-Feb-2023 07:28:06 America/Boise] PHP Warning : simplexml_load_string(): Entity: line 1: parser error : Start tag expected, ‘<’ not found in /home2/scrapbin/public_html/mobi/PWS_quakes_load.php on line 59
[28-Feb-2023 07:28:07 America/Boise] PHP Warning : simplexml_load_string(): � in /…/public_html/mobi/PWS_quakes_load.php on line 59
[28-Feb-2023 07:28:07 America/Boise] PHP Warning : simplexml_load_string(): ^ in /…/public_html/mobi/PWS_quakes_load.php on line 59
[28-Feb-2023 07:28:07 America/Boise] PHP Warning : Invalid argument supplied for foreach() in /…/public_html/mobi/PWS_quakes_load.php on line 64
It seeems that sometimes the xml is damaged or not available.
That can give those warnings.
Better select in your hosting control-panel to not log those warning and notice messages.
There is nothing for you to do with those messages.
You can test the script . . .uayweather.com/pwsWD/PWS_quakes_load.php?json
Or check the file . . .uayweather.com/pwsWD/PWS_listfile.php?file=jsondata/earthquake.json&type=json
All data is recent.
I will check the script and add more test to discard the errornous data.
Fixed advisory block issue by increasing memory setting to 128MB for PHP version 8.1, that was the solution.
Also replaced wrnWarningEU-CAP.php by the new one, but without replacing it also works, so actually I think no need to replace.
When I tested the new “_test.php?test=PWS_quakes_load.php&json&force” it gives no errors, it all looks good.
But in the error.log the error comes back so about every one or two hours, see attachment.
PHP Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, ‘<’ not found
The warning-messages occur when the retrieved xml data is “incorrect”.
That results in warnings.
The scripts can not use that data and the previous file is used.
Most of our data-providers are free to use: earthquake, metar, a few forecasts and so on.
Often a pet-project of a smal group or only 1 individual.
Invalid data can happen and I try in my “1 person PWS_Dashboard” project to cope as good as free time permits.
You should switch of the reporting of warnings and notices. They are not errors. Errors will be removed a.s.a.p.
And as posted earlier, with “[color=blue][b]GIGA[/b][/color]” data warnings will be generated.
Wim
P.S. Why do we see all those messages nowadays:
With PHP 5.6 and 7.x the default webhosting setup was “no messages”
Starting with PHP 8.0 most providers use the new dewfault => show all messages.
Let users decide in their “cPanel” which messages should be shown.
That generates losts of messages, even notices to change scripts because PHP 9 will not support something.
But if the providers do not warn their users we are wasting time on messages.
When switching to PHP 8 check and adapt your webhosting PHP message setting
PHP Memory setting: Same problem when a provider does not warn users for to small memory setting in PHP 8.
Yes, that is why I said already: switch off warning- and notice-messages.
And for a real 24/7 production website all messages should be switched off.
To find “hidden problems” or investigate more deeply, the _test.php script should be used as that script switches error reporting to the highest level before loading index.php
And the debug dashboard (PWS_module_test.php) let you test individual blocks with full error messaging.
Your current messages are warnings not errors.
An error can impact the functionality, but in most cases the scripts will adjust to that.
Most warnings and certainly all notices are informational meant for the developer to take future action.