Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
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
Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024
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
New PHP Upload Process
Moderator: mcrossley
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Re: New PHP Upload Process
No I didn't transfer but I see there hasn't been a change
-
- Posts: 796
- Joined: Thu 14 Aug 2008 7:17 am
- Weather Station: Ecowitt GW1003/GW1103/GW2000
- Operating System: Linux openSUSE
- Location: Broadstairs, Kent, UK
- Contact:
Re: New PHP Upload Process
Just a couple of thoughts from me. There is a default in the PHP upload process where the file being sent has to be in the directory where the upload.php exist or a sub-directory. If you want to upload a file which is not in that tree you have to set a flag in upload.php. Now this is just a guess but could this be an issue? Also could there be a typo in the remote path definition so you are trying to save a file in the wrong place?
I agree turning off permanently modsecurity is a bad idea.
Stuart
I agree turning off permanently modsecurity is a bad idea.
Stuart
Currently running CMX V4 4022
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Re: New PHP Upload Process
Thanks. The uploads go to a folder nested within the folder with upload.php, and I can’t see any typos. Both of these possibilities have been unchanged since b3241.
- mcrossley
- Posts: 12846
- 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
I can look at adding a "content-type: text/plain" header for text files.
However, MX currently has no idea what the file content might be for binary files, but as binary files are sent as base-64 encoded text, it may be possible to use text/plain for them as well.
However, MX currently has no idea what the file content might be for binary files, but as binary files are sent as base-64 encoded text, it may be possible to use text/plain for them as well.
- mcrossley
- Posts: 12846
- 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
I suspect less sites would allow zip uploads than text though?
-
- Posts: 2494
- 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
You're probably correct. I haven't actually looked at what is implemented in the MX code, but I should really as this is my "bread and butter" (but not in php).
- billy
- Posts: 255
- Joined: Mon 30 Nov 2015 10:54 am
- Weather Station: WLL / Davis VP2+
- Operating System: RPi bullseye
- Location: Gooseberry Hill, Western Australia
Re: New PHP Upload Process
Mark, I'm happy to be a guinea pig to test if that would help
mcrossley wrote: ↑Mon 29 May 2023 4:52 pm I can look at adding a "content-type: text/plain" header for text files.
However, MX currently has no idea what the file content might be for binary files, but as binary files are sent as base-64 encoded text, it may be possible to use text/plain for them as well.
- mcrossley
- Posts: 12846
- 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
OK, I'll bear that in mind - it may be a little while though as I'm off on a short break soon...
-
- Posts: 127
- Joined: Fri 27 Sep 2013 2:11 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 10
- Location: Dorset
- Contact:
Re: New PHP Upload Process
I am having trouble getting my moon image to update having changed to the php process. Everything else seems to work except for an oddity explained at 2. below.
1.
I have placed the upload.php file in the root of my site www.geoffwebber.co.uk/weather
The local (at my end) path has not changed C:\CumulusMX\web\moon.png
I thought I understood the rule regarding pathing of files below the location of upload.php.
I have set the remote path for the image to /images/moon.png in the Moon Image section of /internetsettings.html
MX Diags says..
Example
I also get a strange situation from time to time where the Gauges page http://geoffwebber.co.uk/weather/gauges.htm goes into offline mode (red LED) AND the data displayed is many days out of date. Recently the ticker at the top said data not received for a number of days.
Yet checking the date/time of realtimegauges.txt and realtime.txt reveals these are both as up to date as one might expect.
Clicking on the LED icon restarts the page and all is good again.
Not a major issue, just odd to explain...
Cheers
1.
I have placed the upload.php file in the root of my site www.geoffwebber.co.uk/weather
The local (at my end) path has not changed C:\CumulusMX\web\moon.png
I thought I understood the rule regarding pathing of files below the location of upload.php.
I have set the remote path for the image to /images/moon.png in the Moon Image section of /internetsettings.html
MX Diags says..
I'm guessing this is a permissions issue at the remote end, I don't know why, all the other uploads work fine and the above does not.2023-07-01 15:12:00.680 PHP[Int]: Uploading Moon image file
2023-07-01 15:12:00.696 PHP[Int]: Uploading to /images/moon.png
2023-07-01 15:12:00.742 PHP[Int]: Upload to /images/moon.png: Response code = 500: InternalServerError
2023-07-01 15:12:00.742 PHP[Int]: Upload to /images/moon.png: Response text follows:
Error: Cannot create the target file /images/moon.png with this user
Example
2.2023-07-01 15:12:00.633 PHP[Int]: EOD Graph files upload starting
2023-07-01 15:12:00.633 PHP[Int]: Uploading graph data file: airquality.json
2023-07-01 15:12:00.633 PHP[Int]: Uploading to airquality.json
2023-07-01 15:12:00.680 PHP[Int]: Upload to airquality.json: Response code = 200: OK
2023-07-01 15:12:00.680 PHP[Int]: Upload to airquality.json: Response text follows:
Opening text file airquality.json for appending
Appending text file airquality.json
Writing text file airquality.json
Write complete
I also get a strange situation from time to time where the Gauges page http://geoffwebber.co.uk/weather/gauges.htm goes into offline mode (red LED) AND the data displayed is many days out of date. Recently the ticker at the top said data not received for a number of days.
Yet checking the date/time of realtimegauges.txt and realtime.txt reveals these are both as up to date as one might expect.
Clicking on the LED icon restarts the page and all is good again.
Not a major issue, just odd to explain...
Cheers
-
- Posts: 390
- Joined: Sun 27 Feb 2011 5:13 pm
- Weather Station: Ecowitt HP2551 & GW1100
- Operating System: Raspberry Pi OS
- Location: Kangasala, Finland
Re: New PHP Upload Process
It seems you are trying to upload your moon image to the root of the webserver instead of subdirectory on your webfolder. If you want to have the image uploaded to weather/images/moon.png, remove the first slash prom the remote path (/images/moon.png is replaced with images/moon.png).Vegit8 wrote: ↑Sun 02 Jul 2023 8:26 am I have placed the upload.php file in the root of my site www.geoffwebber.co.uk/weather
The local (at my end) path has not changed C:\CumulusMX\web\moon.png
I thought I understood the rule regarding pathing of files below the location of upload.php.
I have set the remote path for the image to /images/moon.png in the Moon Image section of /internetsettings.html
MX Diags says..Error: Cannot create the target file /images/moon.png with this user
-
- Posts: 127
- Joined: Fri 27 Sep 2013 2:11 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 10
- Location: Dorset
- Contact:
Re: New PHP Upload Process
Hah...It seems you are trying to upload your moon image to the root of the webserver instead of subdirectory on your webfolder. If you want to have the image uploaded to weather/images/moon.png, remove the first slash prom the remote path (/images/moon.png is replaced with images/moon.png).
Thank you
-
- Posts: 127
- Joined: Fri 27 Sep 2013 2:11 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 10
- Location: Dorset
- Contact:
Re: New PHP Upload Process
any ideas folks?
2.
I also get a strange situation from time to time where the Gauges page http://geoffwebber.co.uk/weather/gauges.htm goes into offline mode (red LED) AND the data displayed is many days out of date. Recently the ticker at the top said data not received for a number of days.
Yet checking the date/time of realtimegauges.txt and realtime.txt reveals these are both as up to date as one might expect.
Clicking on the LED icon restarts the page and all is good again.
NOTE: This happens even when opening the page for the first time of the day (not every day however).
Not a major issue, just odd to explain...
2.
I also get a strange situation from time to time where the Gauges page http://geoffwebber.co.uk/weather/gauges.htm goes into offline mode (red LED) AND the data displayed is many days out of date. Recently the ticker at the top said data not received for a number of days.
Yet checking the date/time of realtimegauges.txt and realtime.txt reveals these are both as up to date as one might expect.
Clicking on the LED icon restarts the page and all is good again.
NOTE: This happens even when opening the page for the first time of the day (not every day however).
Not a major issue, just odd to explain...
You do not have the required permissions to view the files attached to this post.