Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 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

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

use of upload.php

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

use of upload.php

Post by Stigian »

Hi,

Are there specific settings required to use upload.php? These are the messages I am getting;

Code: Select all

2023-11-08 13:07:28.682 Testing PHP upload compression on https://www.weerstation-vaassen.nl/upload.php
2023-11-08 13:07:28.755 Information PHP upload supports gzip compression
2023-11-08 13:07:28.756 Information UploadFile: DoUploadFTP configured false => No Upload.
2023-11-08 13:07:28.756 Error CheckPackageAndCopy: Upload of utils/index.html to index.html failed.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

If you really want to upload you have to set DoUploadFTP (section [FTP site]) to true for automatic upload.

The fact this name of the parameter and section does not correspond to the PHP technique used has to do with with the late introduction of the PHP upload procedure... it is historically linked to FTP but also counts for PHP. It actually should be understood as DoUpload. One day I will have to make a procedure to clean up all parameters and easily introduce and rename new ones (also for translations). However, though I have already been thinking about it, that is not an easy and quite a big job. So I'll have to rethink it again. For the time being you will have to deal with the parameters as they are.

[FTP site] fortunately is not a large section and as long as you understand that FTP in a parameter name can also mean PHP you'll get it. The most important difference between FTP and PHP uploading is that with PHP uploading all directories are relative to the location of upload.php.

Hope this helps.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

Hi Hans,

Even with this settings on the error persists;

Code: Select all

[FTP site]
DoUploadFTP=true
UploadDir=

2023-11-08 13:33:53.498 Testing PHP upload compression on https://www.weerstation-vaassen.nl/upload.php
2023-11-08 13:33:53.567 Information PHP upload supports gzip compression
2023-11-08 13:33:53.567 Information UploadFile Upload=false -> No file(s) uploaded.
2023-11-08 13:33:53.568 Error CheckPackageAndCopy: Upload of utils/index.html to index.html failed.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

Mmm... that is almost impossible: the first thing in the upload procedure is checking whether we should upload at all so that value is indeed false.
Did you save the inifile after making the change?
Are you sure there are no copies of the inifile and you are accidently working on one of those copies?

If you are sure it is the correct file and you did save, we have a weird situation.
Could you post the whole logfile so I have some context?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

Aha... in the code, after the check for the parameter I check the Cumulus Host parameter:

Code: Select all

string CumulusURL = Sup.GetCumulusIniValue( "FTP site", "Host", "" );
(CUtils uses all internet account parameters from CMX).

That URL cannot be zero and I check that:

Code: Select all

            if ( string.IsNullOrEmpty( CumulusURL ) ) Upload = false; // Kind of paranoia check but well,you never know :|
Paranoia but apparently a correct suspicion it could occur :D
And it is that setting to false which generates your problem.
So you have to configure CMX correctly first.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

CumulusURL is actually a true FTP parameter and the check is incorrect. What needs to be checked in this case is the PHP-URL. This is a bug.
I will fix that for a next version (check the URL depends on the protocol chosen).

For the time being, as a workaround just give the Host parameter in the [FTP site] section of Cumulus.ini a non zero value (e.g. DummyHost) when CMX is not running. Save the file and restart CMX. Then run CUtils again.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

Hi Hans,

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

Re: use of upload.php

Post by HansR »

Yes. See my comment of 14u20
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

HansR wrote: Wed 08 Nov 2023 1:20 pm CumulusURL is actually a true FTP parameter and the check is incorrect. What needs to be checked in this case is the PHP-URL. This is a bug.
I will fix that for a next version (check the URL depends on the protocol chosen).

For the time being, as a workaround just give the Host parameter in the [FTP site] section of Cumulus.ini a non zero value (e.g. DummyHost) when CMX is not running. Save the file and restart CMX. Then run CUtils again.
Thx, upload is working just fine.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

Stigian wrote: Wed 08 Nov 2023 1:39 pm Thx, upload is working just fine.
Good :D . Will fix it in next release so other new users won't have that problem when using PHP upload.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

Hi Hans,

Just a question; is FTP/PHP mandatory for Cumulusutils to function? What if everything is local using "Enable file copy of standard files in CMX" ?
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: use of upload.php

Post by HansR »

Stigian wrote: Fri 17 Nov 2023 12:51 pm Just a question; is FTP/PHP mandatory for Cumulusutils to function? What if everything is local using "Enable file copy of standard files in CMX" ?
Hi,

CUtils functions without FTP/PHP: if you set:

Code: Select all

[FTP site] 
DoUploadFTP=false
nothing will go anywhere and you will have to move the files manually (or some script :) ). This is the same for all UserAskedData JSON files. And the naming FTP is historically so because the PHP upload came much later :|

Another possibility is using an FTP or (Apache) HTTP(S) server on your own machine and simply FTP/PHP to the localhost or IP. There are users doing that.

Note: the update procedure has to be done manually to the server as well (the libs, css etc...)
Note: the signature file for the map is sent independent of all other files to the map server.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

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

Re: use of upload.php

Post by HansR »

Stigian wrote: Fri 17 Nov 2023 1:52 pm thanks for the explanation
I see you made the site inaccessible and removed link from the map entry.
Will that be permanent? Unless questions are simple, I will not support sites which I cannot access.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
User avatar
Stigian
Posts: 68
Joined: Sun 22 Aug 2021 3:56 pm
Weather Station: 6242EU Vantage Vue
Operating System: Debian 12 (Bookworm)
Location: Vaassen (NL)
Contact:

Re: use of upload.php

Post by Stigian »

It's up & running again. I'm still in the progress of finding the "ultimate" setup :D So please bear with me
Post Reply