Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

PHP Upload errors

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
dalek@clara.net
Posts: 4
Joined: Sun 10 Mar 2013 9:53 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Longwell Green, Bristol, United Kingdom
Contact:

PHP Upload errors

Post by dalek@clara.net »

Hi everyone,

I'm fairly technically illiterate (e.g. I've never tangled with setting up websites before) so please be gentle with me! Advance thanks to anyone who can help.

I've been running CumulusMX for some time (currently 3.27.1 build 3263) and am trying to set up the supplied default website using the PHP Upload method to transfer data. Webhosting is from WebHostUK.

So far I've:
- copied all the distributed contents of webfiles and subfolders into the root folder of my webspace
- made Internet Settings changes to enable update via PHP and to add the URL of upload.php
- ticked the 'I want to use the supplied default website' box
- added the generated secret to upload.php and copied it to the root folder of my webspace
- restarted CuMX

I now have a website home page visible at www.longwellgreenweather.co.uk BUT there is no dynamic data on it nor links to the pages.

I can see some files are being uploaded successfully to my webserver at the prescribed 5 minute intervals (e.g. realtime.txt) but many data files are empty.

There is an error log on my webserver which has 15 entries every 5 minutes as follows (just an extract ...):

[28-Feb-2024 12:55:02 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171
[28-Feb-2024 12:55:03 UTC] PHP Fatal error: Uncaught Error: Call to undefined function gzdecode() in /home/longwell/public_html/upload.php:171
Stack trace:
#0 {main}
thrown in /home/longwell/public_html/upload.php on line 171

These seem to correspond to the 15 entries every 5 minutes on the MX Error Log (again, just an extract....):

2024-02-28 12:55:01 - PHP[Int]: Upload to alldailydegdaydata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to images/moon.png: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alltempsumdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alldailyraindata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alldailypressdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alldailyhumdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alldailywinddata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to alldailytempdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to raindata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to humdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to wdirdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to tempdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to winddata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to pressdata.json: Response code = 500: InternalServerError
2024-02-28 12:55:01 - PHP[Int]: Upload to websitedata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to images/moon.png: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailydegdaydata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alltempsumdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailytempdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailyraindata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailywinddata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailyhumdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to alldailypressdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to raindata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to wdirdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to winddata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to humdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to tempdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:01 - PHP[Int]: Upload to pressdata.json: Response code = 500: InternalServerError
2024-02-28 12:50:00 - PHP[Int]: Upload to websitedata.json: Response code = 500: InternalServerError
2024-02-28 12:45:01 - PHP[Int]: Upload to alltempsumdata.json: Response code = 500: InternalServerError

Recent MXdiags attached. They seem to indicate problems 'unzipping data'.

All ideas gratefully received!

Ken
You do not have the required permissions to view the files attached to this post.
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: PHP Upload errors

Post by HansR »

Some json's are sent (e.g. leafwetdata.json) but are empty i.e. have only accolades: {}

The files which give a 500 error show nothing at all but they don't give a 404 not found.
So apparently the files are there but induce an error. Maybe removing all json's on the server and see what that does?

It is strange that some files transfer and some don't. It does not appear to be the upload.php.
You might restart CMX (keep debug/dat logging on) and post the new log after some minutes so we can see what the init status (including zip) is.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12776
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Upload errors

Post by mcrossley »

It looks like your PHP install has not included zlib support?

Code: Select all

 Call to undefined function gzdecode()
Is it a very old version of PHP? I think pre version 6 it was an optional component.
dalek@clara.net
Posts: 4
Joined: Sun 10 Mar 2013 9:53 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Longwell Green, Bristol, United Kingdom
Contact:

Re: PHP Upload errors

Post by dalek@clara.net »

Thanks Mark and Hans,

Re Mark's comment, I will show my ignorance and ask whether you are asking about PHP on the webserver? I've found a 'PHP Selector' screen in WebHostUK (image attached) which seems to indicate that the version of PHP is 8.1 and it includes zlib.

Hans, you're right that there are files on the webserver with zero size, many have an update date corresponding to the first time the upload ran (yesterday) and don't appear to have been updated since. These include many data files which are relevant to the elements I am recording (for example, winddata.json, winddir.json, tempdata.json) - incomplete print of root directory attached. I'll follow up your suggestions and feedback.

Thanks again,
Ken
You do not have the required permissions to view the files attached to this post.
dalek@clara.net
Posts: 4
Joined: Sun 10 Mar 2013 9:53 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Longwell Green, Bristol, United Kingdom
Contact:

Re: PHP Upload errors

Post by dalek@clara.net »

Hi,

I deleted the .jsons on the webserver. Next time the upload ran (at 18.05) it reproduced the situation of some files with zero size and others with data ( see attached partial root folder print). The webserver error log shows the 'usual' 15 errors on gzdecode.

I then restarted CuMX and have attached its log which covers the next attempted upload at 18.10.

Any ideas very gratefully received!
Ken
You do not have the required permissions to view the files attached to this post.
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: PHP Upload errors

Post by HansR »

OK, so that does not work. The log shows however that your server supports compression.
Still unclear what is causing this (you have PHP 8.1 so that should be OK)

I have two remarks:

1) You run build b3263. There have been some changes in the upload.php, I am not fully aware when that happened but I would advise to upgrade to the lates CMX version and when doing that, update the upload.php procedure with the one that comes with it.

2) HTTPS

Code: Select all

2024-02-28 18:08:22.600 Failed to get the latest build version from GitHub - Exception Type: System.Net.Http.HttpRequestException
Message: An error occurred while sending the request.
Inner Exception... 
Exception Type: System.Net.WebException
Message: The request was aborted: Could not create SSL/TLS secure channel.
Apparently you cannot properly access HTTPS links. That may be an issue as well.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
mcrossley
Posts: 12776
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Upload errors

Post by mcrossley »

You could create a simple file called say info.php and set the contents to...

Code: Select all

<?php
phpinfo();
Upload the file to your server and open it from your web server using a browser. It will tell you if support is enabled or not.
dalek@clara.net
Posts: 4
Joined: Sun 10 Mar 2013 9:53 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 7
Location: Longwell Green, Bristol, United Kingdom
Contact:

Re: PHP Upload errors

Post by dalek@clara.net »

Thanks Mark and Hans,

Armed with your ideas I thought it would be worth talking to my web hosting company Web Host UK. And they have solved the problem!!

Turns out that they needed to enable an extension on my site - they called it a gzencode extension. They confirmed that I am on PHP 8.1.22.

So for anyone who has a similar problem - 'undefined function gzdecode()' whilst running upload.php - the above extension to PHP may be the solution you need.

WebHost UK also solved a problem I had with Kaspersky objecting to my 'untrustworthy site' by installing an auto-renewing SSL certificate for my domain (for free).

So top marks to them for the responsiveness of their support people (all the above was achieved within 20 minutes).

And thanks again to you for your rapid responses and support.

Ken
User avatar
HansR
Posts: 5969
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: PHP Upload errors

Post by HansR »

Good :D
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Post Reply