Page 1 of 2
use of upload.php
Posted: Wed 08 Nov 2023 12:13 pm
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.
Re: use of upload.php
Posted: Wed 08 Nov 2023 12:27 pm
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.
Re: use of upload.php
Posted: Wed 08 Nov 2023 12:35 pm
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.
Re: use of upload.php
Posted: Wed 08 Nov 2023 12:57 pm
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?
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:12 pm
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
And it is that setting to false which generates your problem.
So you have to configure CMX correctly first.
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:20 pm
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.
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:21 pm
by Stigian
Hi Hans,
This is a new installation. Attached is the log file.
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:30 pm
by HansR
Yes. See my comment of 14u20
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:39 pm
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.
Re: use of upload.php
Posted: Wed 08 Nov 2023 1:46 pm
by HansR
Stigian wrote: ↑Wed 08 Nov 2023 1:39 pm
Thx, upload is working just fine.
Good

. Will fix it in next release so other new users won't have that problem when using PHP upload.
Re: use of upload.php
Posted: Fri 17 Nov 2023 12:51 pm
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" ?
Re: use of upload.php
Posted: Fri 17 Nov 2023 1:23 pm
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:
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.
Re: use of upload.php
Posted: Fri 17 Nov 2023 1:52 pm
by Stigian
thanks for the explanation
Re: use of upload.php
Posted: Fri 17 Nov 2023 2:01 pm
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.
Re: use of upload.php
Posted: Fri 17 Nov 2023 2:05 pm
by Stigian
It's up & running again. I'm still in the progress of finding the "ultimate" setup

So please bear with me