WUReport script ** Solved **

I have 2 servers. one server is not updating the WUreports. ( weatheryyc.ca ). The entire year of 2024 is missing.
I have the cronjobs configure for both servers.

Anyone got any ideas?

Blaine

Is this any help?

i tried it but no luck

in the module_test I get the following errors
’

PWS_load_files.php (505) WU-today-CSV__: time spent: 0.281 -  invalid CURL HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1) https://weatheryyc.ca/pwsWD/PWS_DailyHistory.php?ID=IABCALGA38&graphspan=day&day&month&year&format=1
PWS_load_files.php (505) WU-month-CSV__: time spent: 0.2624 -  invalid CURL HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1) https://weatheryyc.ca/pwsWD/PWS_DailyHistory.php?ID=IABCALGA38&graphspan=custom&year=2024&month=07&day=14&yearend=2024&monthend=08&dayend=14&format=1
PWS_load_files.php (505) WU-year-CSV___: time spent: 0.2526 -  invalid CURL HTTP/2 stream 0 was not closed cleanly: Unknown error code (err 1) https://weatheryyc.ca/pwsWD/PWS_DailyHistory.php?ID=IABCALGA38&graphspan=custom&year=2023&month=08&day=14&yearend=2024&monthend=08&dayend=14&format=1'

I don’t use WU but I assume a password or API key is used to access the data? Is it possible that WU have invalidated the password/key and that’s stopping the download? Not sure how you’d check but maybe get the latest key from WU and check if that’s what your using?

Key is OK.
It works fine on weatheryyc.com, but not weatheryyc.ca and stopped working on jan 1 2024

Ok. I was thinking there would be two keys for two sets of station data.

I have no computer available so I will test later.
Are your two websites identical or are they using different providers?

Also the error code 1 points to

CURLE_UNSUPPORTED_PROTOCOL (1)

The URL you passed to libcurl used a protocol that this libcurl does not support. The support might be a compile-time option that you did not use, it can be a misspelled protocol string or just a protocol libcurl has no code for.


The script > https://weatheryyc.ca/pwsWD/PWS_DailyHistory.php?sce=view
returns an error
The script > https://weatheryyc.com/pwsWD/PWS_DailyHistory.php?sce=view
works OK

The webservers are certainly different, but both should allow a simple listing of a script.

Yes, the servers are different. .ca is my own local server. .com is a hosting company

It seems to be a hosting-setup problem as even the sce=view does not work.
Sadly there is not much I or other outsiders can do.

Attached a smal script which lists the setup of the PHP environment.
Maybe when running it on both your servers you can find important differences.

info.php.zip (501 Bytes)

Succes,
Wim

I’m not supposed to be smart about anything server-related, but it looks weird to me.
sce=view works for me on both -----.ca and ------.com

Thanks,
What browser and on what PC/tablet were you testing this?

All past tests at weatheryyc.ca resolved in messages such as
“cannot parse response’ (NSURLErrorDomain:-1.017)”
“incomplete data”
a.s.o.
or a blank screen

But currently (2024-08-18 16:00 UTC)

  1. the sce=view works also for .ca
  2. the PWS_DailyHistory.php scripts seems to load correct data.

Sadly the communication between PWS_load-files.php and PWS_DailyHistory.php seems still broken.

Wait for new information from the OP

Wim

The error message in PWS_loadfiles.php reads “CURL HTTP/2 stream 0 was not closed cleanly”

Answers (using google search):

We have to add another setting in two scripts

  1. PWS_DailyHistory.php → as the stream comes from this script
  2. PWS_load_files.php → as it receives the stream

Will do and check if the do not introduce new errors.
Probably tomorrow.

Wim

Works for me too (Edge on Windows PC), but I did notice OP is running different file versions on the two servers: I only checked index.php (PWS_index2.php) and PWS_load_files.php. . .

New test version attached for OP’s .ca website
PWS_load_files.php.zip (7.8 KB)

Forces HTTP 1.1 communication

Wim,

I use
Chrome Version 127.0.6533.120 (Official Version) (64-bit)
and Windows 10 on an old Lenovo T420

File updated. No change… Next to do PHP Info comparison

I seem to recall there was a file called startRecords.php. I don’t see it now.

Lots of differences in php info. Does anyone know what I should be looking for?

First we have to test the update in the other script also.
PWS_DailyHistory.php.zip (8.0 KB)

succes,
Wim

Problem solved.

Both https://weatheryyc.ca/ and https://weatheryyc.com (aka https://wxcalgary.net/) can load correct WU data.

These “in house web-server” type of problems are very difficult to solve as there is no “hosting support” and often no low-level or FTP access.

Glad it all works (for now). :smiley:

Wim