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 4021) - 04 May 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

New PHP Upload Process

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

User avatar
mcrossley
Posts: 12816
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

New PHP Upload Process

Post by mcrossley »

If you are thinking of trying out the new PHP upload process, please read the Wiki page on how to set it up here: https://www.cumuluswiki.org/a/PHP_Uploads

NOTE: It is not a requirement to change to using the PHP Upload method. The existing FTP/FTPS/SFTP methods remain fully supported and operational.
water01
Posts: 3271
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: New PHP Upload Process

Post by water01 »

Further to this I don't know if it any help to anyone else but when I switched to PHP uploads I did the following.

I first copied my existing Cumulus.ini to another file elsewhere and then I edited it. This allowed me to change all the existing uploads to the relative position of the PHP uploads file (I have 15 uploads) and then I also added the additional items that that the PHP upload required and copied up the PHP upload program to my website.

I then stopped CumulusMX and copied the old cumulusMX.ini SFTP file and saved it and then substituted my newly edited copy. Started CumulusMX and tested the upload feature by using the FTP/Copy function. I had, in my case one error that I had forgotten about the NOAA reports as that had to change as well.

Made that change and bingo all was well. In all it took about 20 minutes.
David
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

Now my next hurdle as I'm getting an Error:500(error) Error processing website Settings. The method or operation is not implemented.

Steps so far:

1) Changed upload in 'Internet settings' to php;
2) Copied secret code from 'Internet Settings' (once .php is selected) and updated the CMX .php file where indicated (in between the '....' marks);
3) Updated URL in 'Internet Settings' to: https://calvertoncam.co.uk/weather/upload.php;
4) Uploaded the amended .php file from CMX to my website in the weather folder using Filezilla;
5) revisit the Internet settings folder and when selecting 'Save Settings' get the Error:500(error), mentioned above.

On a side note I am still on 3:24:2 b3235

Sorry to be an absolute :|

Martyn
Image
water01
Posts: 3271
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: New PHP Upload Process

Post by water01 »

You haven't followed the instructions on entering the secret code that CumulusMX generates and put it into the appropriate place in upload.php as it is saying "You must change the default secret", which is the error message you get when this your shared secret does not match the one in upload.php.
David
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

I have checked, and repeated the process for copying and updating the 'Secret Code' in the Cumulus 'upload.php' file and saved it again.

Opened it in CMX to check it has the correct code (which it has) and uploaded it again to the server.

Opened it on the server to check and it does have the correct code.

Should I be removing the ' before and after where the secret code goes or do they remain in place?

I cant see anything else i'm missing.
MX Screenshot.jpg
This is the 'upload.php' file on the server with the Secret Code added:

At this location:
You do not have the required permissions to view the files attached to this post.
Image
User avatar
PaulMy
Posts: 3868
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: New PHP Upload Process

Post by PaulMy »

@Nottub, interesting that a few minutes ago your https://calvertoncam.co.uk/weather/realtime.txt and https://calvertoncam.co.uk/weather/realtimegauges.txt are updating... but now have not updated for over 10 minutes. Possibly you are making changes or tests?
Should I be removing the ' before and after where the secret code goes or do they remain in place?
Yes, remain in place, so you have that correct.

Enjoy,
Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

Seems OK after a restart..... :clap:

Don't know how to update the 'Extra Webfiles' though, as they aren't uploading. I know the suggestion is to make the reference relative but i'm not sure what that means.

If I had a webcam image destination filename as 'weather/images/webcam.jpg', what should this be changed to?

Sorry I'm thick, but am trying.

Martyn
Image
freddie
Posts: 2490
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: New PHP Upload Process

Post by freddie »

Yes, restart required.

You should change the paths relative to where the PHP upload page is on your site. So if it is in the weather directory then your path for your example extra file will be this:

Code: Select all

images/webcam.jpg
Freddie
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

I'm going to have to come back to this, i'm getting angry now that the webcam won't upload despite the changes made :evil: .

The banner text won't update (realtime.txt file) on the server, goodness knows what else isn't working.

Sorry but I need to come back to this later. :!:

Martyn
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

Reverted to ftp.

Turns out no new data was being uploaded in .php!

realtime.txt (not uploading)
realtimegauges.txt (not uploading)

Don't know what the issue is!

Sorry I'm just not a technical person.

Martyn
Image
water01
Posts: 3271
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: New PHP Upload Process

Post by water01 »

If you upload a copy of the MXDiags .txt file for the php uploads perhaps we can find the problem.

Silly question PHP is implemented on your host?

Try uploading the attached file (once unzipped) to your website and run https://www.yourwebsite/phpinfo.php to check it.
You do not have the required permissions to view the files attached to this post.
David
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

I presume this means it's ok?

php check.jpg
I'll try .php uploads tomorrow and turn on 'Debug' and 'Data Logging' before I do so.

Thanks for your patience.

Martyn
You do not have the required permissions to view the files attached to this post.
Image
water01
Posts: 3271
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: New PHP Upload Process

Post by water01 »

Yes that eliminates one question, so now we need to see a MxDiags file from when you were running phpupload.

By the way you should delete the phpinfo file from your server as it is not a good idea to leave it there.
David
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

Looking at the initial diagnostics it looks like I need to change the 'default secret'.

EXTRACT: 2023-04-26 18:47:17.468 PHP[0]: realtime.txt: Response text follows:
You must change the default secret


If this is the case do I overwrite it in the 'Internet settings' with whatever numbers I choose?

Then copy this into the MX version of 'upload.php

Finally upload to my server?

Martyn

20230426-184525.zip
You do not have the required permissions to view the files attached to this post.
Image
Nottub
Posts: 201
Joined: Fri 04 Dec 2020 4:35 pm
Weather Station: Davis VP2 (Cabled)
Operating System: RPi 4 (Bookworm)
Contact:

Re: New PHP Upload Process

Post by Nottub »

BTW:

I use the PC interface with MX to update the Internet settings.

Copy and paste into MX on the RPi to update the 'upload.php'.

Then copy back to the PC and use Filezilla to send to my service providers server. Which I view to check it's correct.

Martyn
Image
Post Reply