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

griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: New PHP Upload Process

Post by griffo42 »

PaulMy wrote: Mon 13 Nov 2023 1:02 am Hi again,
Just saw your capture after I posted, and you should remove the public_html/ from your Destination filename. And the same in NOAA settings if you upload those.

Enjoy,
Paul
I'm sure I need something else other than what you suggest for the path. Perhaps this below will help you advise me what I need to do with the extra files set up.

My directory setup is:

All files for my Saratoga site are contained in the public_html folder on the server.
All files for my Cumulus site are contained in a folder named cumx in the public_html folder.
Similarly, all files for my Cumulus MX UI site are contained in a folder named mxtestv2 in the public_html folder.
Similarly, all files for my Cumulus HWS site are contained in a folder named pwsWD in the public_html folder.

Cumulus site works perfectly: the other 3 do not.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
User avatar
HansR
Posts: 5986
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: New PHP Upload Process

Post by HansR »

griffo42 wrote: Mon 13 Nov 2023 7:01 am My directory setup is:

All files for my Saratoga site are contained in the public_html folder on the server.
All files for my Cumulus site are contained in a folder named cumx in the public_html folder.
Similarly, all files for my Cumulus MX UI site are contained in a folder named mxtestv2 in the public_html folder.
Similarly, all files for my Cumulus HWS site are contained in a folder named pwsWD in the public_html folder.

Cumulus site works perfectly: the other 3 do not.
The question is: where is your upload.php located?
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: New PHP Upload Process

Post by griffo42 »

Here are 2 screenshots of part of my cumulus.ini file which may be pertinent to the above:
Screenshot 2023-11-13 170447.png
Screenshot 2023-11-13 170354.png
You do not have the required permissions to view the files attached to this post.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: New PHP Upload Process

Post by griffo42 »

HansR wrote: Mon 13 Nov 2023 7:12 am
griffo42 wrote: Mon 13 Nov 2023 7:01 am My directory setup is:

All files for my Saratoga site are contained in the public_html folder on the server.
All files for my Cumulus site are contained in a folder named cumx in the public_html folder.
Similarly, all files for my Cumulus MX UI site are contained in a folder named mxtestv2 in the public_html folder.
Similarly, all files for my Cumulus HWS site are contained in a folder named pwsWD in the public_html folder.

Cumulus site works perfectly: the other 3 do not.
The question is: where is your upload.php located?
My upload.php is located in the cumx folder cited above.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
User avatar
HansR
Posts: 5986
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: New PHP Upload Process

Post by HansR »

griffo42 wrote: Mon 13 Nov 2023 7:15 am
HansR wrote: Mon 13 Nov 2023 7:12 am
griffo42 wrote: Mon 13 Nov 2023 7:01 am My directory setup is:

All files for my Saratoga site are contained in the public_html folder on the server.
All files for my Cumulus site are contained in a folder named cumx in the public_html folder.
Similarly, all files for my Cumulus MX UI site are contained in a folder named mxtestv2 in the public_html folder.
Similarly, all files for my Cumulus HWS site are contained in a folder named pwsWD in the public_html folder.

Cumulus site works perfectly: the other 3 do not.
The question is: where is your upload.php located?
My upload.php is located in the cumx folder cited above.
OK, that's the issue.

From there you define all your uploads relative to that directory. So if you want to upload a file to the webroot (public_html) you tell CMX to upload it to ../ so your CUtags-new.php upload destination becomes

Code: Select all

../CUtags-new.php
Etc... for all uploads.

The above assumes you defined your PHP-URL correctly but since your cumx site seems correct I take it that is OK.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
HansR
Posts: 5986
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: New PHP Upload Process

Post by HansR »

NOTE if the PHP upload procedure complains you step out of the permitted directory structure I would advise to put upload.php in the public_html and upload everything from there. Since all directories are under public_html you stay withing the permitted tree. In that case your upload for CUtags would become:

Code: Select all

cumx/CUtags-new.php
[EDIT} Maybe public_html is the best location after all for the upload.php.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
griffo42
Posts: 231
Joined: Thu 10 Dec 2015 6:41 am
Weather Station: Davis Vantage Pro2
Operating System: Win 11 Home
Location: Brisbane, Queensland, Australia
Contact:

Re: New PHP Upload Process

Post by griffo42 »

@HansR
After, what I thought was following your advice very carefully, i have been unable to get the PHP uploads working, I have now reverted to FTP uploads.

Thanks for your help.
Keith
Davis Vantage Pro2 Model #6152AU - CumulusMX - Win11 - Saratoga/CUMX Default Scripts
https://www.kstwx.net/index.php
https://www.kstwx.net/cumx/index.html
Image
User avatar
HansR
Posts: 5986
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: New PHP Upload Process

Post by HansR »

Strange situation, you are the first I hear from who can't upload over https :groan:
Anyway, maybe you get a brain wave sometime and try again.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Mapantz
Posts: 1827
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: New PHP Upload Process

Post by Mapantz »

upload.php has stopped working for me, since last night.

Code: Select all

2023-12-09 01:51:47.087 PHP[83]: Sending via GET
2023-12-09 01:51:47.097 PHP[83]: Uploading to realtimegauges.txt
2023-12-09 01:51:47.097 PHP[83]: Sending via GET
2023-12-09 01:51:47.097 PHP[83]: Uploading to realtime.xml
2023-12-09 01:51:47.097 PHP[83]: Sending via POST
2023-12-09 01:51:47.097 PHP[83]: Upload to realtime.txt: Response code = 422: 422
2023-12-09 01:51:47.097 PHP[83]: Upload to realtime.txt: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1702086707
Server TS = 1702083845
2023-12-09 01:51:47.108 PHP[83]: Upload to realtimegauges.txt: Response code = 422: 422
2023-12-09 01:51:47.108 PHP[83]: Upload to realtimegauges.txt: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1702086707
Server TS = 1702083845

2023-12-09 01:51:47.162 PHP[83]: Upload to realtime.xml: Response code = 422: 422
2023-12-09 01:51:47.162 PHP[83]: Upload to realtime.xml: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1702086707
Server TS = 1702083845
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 »

Stop using the GET for small files by disabling it in the Advanced settings, worked for me on my site. Makes no difference that I can see to the upload, but the occasional Get failures disappeared.
David
Image
Mapantz
Posts: 1827
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: New PHP Upload Process

Post by Mapantz »

water01 wrote: Sat 09 Dec 2023 9:34 am Stop using the GET for small files by disabling it in the Advanced settings, worked for me on my site.
Tried that, didn't work.
Image
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:

Re: New PHP Upload Process

Post by mcrossley »

Your server time is 138 seconds ahead of your MX time. One of them is not synchronising it's clock.
Mapantz
Posts: 1827
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: New PHP Upload Process

Post by Mapantz »

mcrossley wrote: Sat 09 Dec 2023 11:45 am Your server time is 138 seconds ahead of your MX time. One of them is not synchronising it's clock.
I contacted my host and told them it stopped working at 01:25. I got this back..
I have switched the PHP version to 7.4 and also disabled the following code in the php.ini file which did the trick.
zlib.output_compression = On
zlib.output_handler = ob_gzhandler
It was already on PHP 7.4 and I hadn't changed any settings
Image
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:

Re: New PHP Upload Process

Post by mcrossley »

Mapantz wrote: Sat 09 Dec 2023 12:18 pm
mcrossley wrote: Sat 09 Dec 2023 11:45 am Your server time is 138 seconds ahead of your MX time. One of them is not synchronising it's clock.
I contacted my host and told them it stopped working at 01:25. I got this back..
I have switched the PHP version to 7.4 and also disabled the following code in the php.ini file which did the trick.
zlib.output_compression = On
zlib.output_handler = ob_gzhandler
It was already on PHP 7.4 and I hadn't changed any settings
Totally irrelevant afaics, the error messages are clear, the script had compared the time stamp from MX and the server time and found them adrift - nothing to do with compression.
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 »

That is a question I have been meaning to ask, what version of PHP do you advise running Mark.

I am trying to get all my PHP up to 8.0 but if you have not tested against it, it may be a problem.
David
Image
Post Reply