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

Php upload does not work

From Cumulus MX version 3 build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since, and has recently released Cumulus MX version 4. 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

Post Reply
User avatar
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Php upload does not work

Post by meteosangonera »

Hello everyone, and happy new year.

I open this thread, because for a few days, I have problems with the PHP upload.

I use this system from the first versions of CumulusMX in which it was available, and for 3 days, I have many problems due to the update time.

The error shown by Cumulusmx is as follows:

Code: Select all

2025-01-08 10:55:29.350 PHP[Int]: HTTP Error uploading to alldailyraindata.json: Response code = 422: UnprocessableEntity
2025-01-08 10:55:29.350 PHP[Int]: Uploading daily graph data file: alltempsumdata.json
2025-01-08 10:55:29.453 RealtimePHP[5]: Upload to realtime.txt: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1736330129
Server TS = 1736330104
I tried to synchronize the time of Windows 11, with WeatherLink I updated the time of my Vantage Vue station, but I can't get it to work properly. Do you think it can be a problem with the server where is my website hosted?

Thank you very much.
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: Php upload does not work

Post by HansR »

meteosangonera wrote: Wed 08 Jan 2025 10:05 am Hello everyone, and happy new year.

I open this thread, because for a few days, I have problems with the PHP upload.

I use this system from the first versions of CumulusMX in which it was available, and for 3 days, I have many problems due to the update time.

The error shown by Cumulusmx is as follows:

Code: Select all

2025-01-08 10:55:29.350 PHP[Int]: HTTP Error uploading to alldailyraindata.json: Response code = 422: UnprocessableEntity
2025-01-08 10:55:29.350 PHP[Int]: Uploading daily graph data file: alltempsumdata.json
2025-01-08 10:55:29.453 RealtimePHP[5]: Upload to realtime.txt: Response text follows:
Error: TimeStamp is out of date
Data TS   = 1736330129
Server TS = 1736330104
I tried to synchronize the time of Windows 11, with WeatherLink I updated the time of my Vantage Vue station, but I can't get it to work properly. Do you think it can be a problem with the server where is my website hosted?

Thank you very much.
Hi, and the same to you.

It apparently it takes too long to process on the server (that is where the error comes from). I assume the time synchronisation of your PC works fine and you may assume the server has the correct time. It is only the time on your PC and on the server which is relevant. And yes, from what you say I would think a server issue is most likely.

Check the following:
  1. Do you use the most recent upload.pgp procedure? There have been updates in the past.
  2. Is your server free of malicious software or is there any attack on your site? Check also with your provider.
  3. Do you use a recent version of PHP?
  4. ...
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
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: Php upload does not work

Post by meteosangonera »

Hi HansR

I have checked the PHP version. I'm on 7.4 but moving to 8.3 doesn't change anything.

I don't know what you mean by "Do you use the most recent upload.pgp procedure? There have been updates in the past."

I have been upgrading cumulusMX versions and currently use Cumulus MX v:4.3.3, b:4070.

At the moment I have manually delayed the windows time by a few seconds and the PHP upload is working again. But if it continues to give problems I will have to go back to the old system via FTP. :(
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: Php upload does not work

Post by water01 »

Apologies Hans called it the wrong name it is upload.php and it can be found in the release you are using in the webfiles directory. You must amend it to use the string generated by CumulusMX when you select the upload protocol 3 - Use PHP upload in the Web/Upload Settings. Click on the PHP Upload Secret box and the code will be revealed.
David
Image
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: Php upload does not work

Post by HansR »

water01 wrote: Wed 08 Jan 2025 12:24 pm Apologies Hans called it the wrong name it is upload.php [...]
Water01 is correct. Sorry for the typo (pgp must be php).
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
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Php upload does not work

Post by mcrossley »

The server is only taking 0.1 seconds to process the upload. But the time difference between your computer and the server is 25 seconds.

If you are sure your computer time is accurate, then it must be server time that is wrong. I suggest you contact your hosting company and ask them to check it.
User avatar
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: Php upload does not work

Post by meteosangonera »

Hello, and thank you for your help.

I have contacted the managers of my domain and they assure me that everything is correct.
I have changed the upload.php file using the one that was in the latest version of CumulusMX.
I have synchronised and resynchronised the time on my PC through time.windows.com service.

All this still does not work. I would like to make sure that the server time is correct, I don't know if you know of any script that I can use to check it.
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Php upload does not work

Post by ConligWX »

meteosangonera wrote: Thu 09 Jan 2025 12:07 pm I don't know if you know of any script that I can use to check it.
chatgpt is your friend

Example in an HTML Page:

Code: Select all

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Server Time</title>
</head>
<body>
    <h1>Current Server Time:</h1>
    <p><?php echo date('l, F j, Y, g:i A'); ?></p>
</body>
</html>

Code: Select all

Server Time: 2025-01-09 14:30:45
or:

php code:

Code: Select all

<?php
// Get the current server time
$serverTime = date('Y-m-d H:i:s');

// Get the server's time zone
$serverTimezone = date_default_timezone_get();

// Display the server time and time zone
echo "Server Time: " . $serverTime . " (" . $serverTimezone . ")";
?>

Code: Select all

Server Time: 2025-01-09 14:30:45 (UTC)
User avatar
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: Php upload does not work

Post by meteosangonera »

ConligWX wrote: Thu 09 Jan 2025 1:12 pm
meteosangonera wrote: Thu 09 Jan 2025 12:07 pm I don't know if you know of any script that I can use to check it.
chatgpt is your friend

Example in an HTML Page:

Code: Select all

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Server Time</title>
</head>
<body>
    <h1>Current Server Time:</h1>
    <p><?php echo date('l, F j, Y, g:i A'); ?></p>
</body>
</html>

Code: Select all

Server Time: 2025-01-09 14:30:45
or:

php code:

Code: Select all

<?php
// Get the current server time
$serverTime = date('Y-m-d H:i:s');

// Get the server's time zone
$serverTimezone = date_default_timezone_get();

// Display the server time and time zone
echo "Server Time: " . $serverTime . " (" . $serverTimezone . ")";
?>

Code: Select all

Server Time: 2025-01-09 14:30:45 (UTC)
I haven't embarked on the AI adventure yet!!! :bash:

Thank you very much for the code.

The server time is indeed not correct. It has a delay of between 20 and 30 seconds. https://www.meteosangonera.es/hora-del-servidor/

I have reopened a request to the webhosting company.

Thank you all very much.
User avatar
meteosangonera
Posts: 64
Joined: Thu 07 Jun 2018 2:17 pm
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Contact:

Re: Php upload does not work

Post by meteosangonera »

The server time has been corrected and everything is working as expected.

Thanks again.
User avatar
ConligWX
Posts: 1835
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis vPro2+ w/DFARS + AirLink
Operating System: Ubuntu 24.04.1 LTS
Location: Bangor, NI
Contact:

Re: Php upload does not work

Post by ConligWX »

meteosangonera wrote: Thu 09 Jan 2025 4:49 pm The server time has been corrected and everything is working as expected.

Thanks again.
glad you got it working.
Post Reply