Page 1 of 1
Php upload does not work
Posted: Wed 08 Jan 2025 10:05 am
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.
Re: Php upload does not work
Posted: Wed 08 Jan 2025 10:38 am
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:
- Do you use the most recent upload.pgp procedure? There have been updates in the past.
- Is your server free of malicious software or is there any attack on your site? Check also with your provider.
- Do you use a recent version of PHP?
- ...
Re: Php upload does not work
Posted: Wed 08 Jan 2025 12:08 pm
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.

Re: Php upload does not work
Posted: Wed 08 Jan 2025 12:24 pm
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.
Re: Php upload does not work
Posted: Wed 08 Jan 2025 12:32 pm
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).
Re: Php upload does not work
Posted: Wed 08 Jan 2025 9:23 pm
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.
Re: Php upload does not work
Posted: Thu 09 Jan 2025 12:07 pm
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.
Re: Php upload does not work
Posted: Thu 09 Jan 2025 1:12 pm
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>
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)
Re: Php upload does not work
Posted: Thu 09 Jan 2025 4:19 pm
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>
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!!!
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.
Re: Php upload does not work
Posted: Thu 09 Jan 2025 4:49 pm
by meteosangonera
The server time has been corrected and everything is working as expected.
Thanks again.
Re: Php upload does not work
Posted: Thu 09 Jan 2025 8:25 pm
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.