Hi,
I reckon this is a simple problem but I am darned if I know whats going on.
I am porting my website from Windows to RPI and its going okay - ish. One problem I don't seem to be able to get over is the templates not finding my realtime.txt file. Here is a line from the Apache log:
... 14:26:49 +0100] "GET /realtime.txt?1474205210632 HTTP/1.1" 404 508 "http://weatherpi/wxgraphs.php" ...
404 shows the file is not found but it IS there in the folder (and all lowercase, in case anyone is wondering). What is the significance of the number after the question mark? I half remember something about this being something to do with ensuring a fresh copy of realtime.txt is obtained every request but I can't for the life of me remember where that number comes from or what it means or if it is anything to do with the file not being found.
Can anyone help please?
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
Saratoga templates on Raspberry PI
Moderator: saratogaWX
-
- Posts: 220
- Joined: Mon 03 Jan 2011 4:27 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 7
- Location: Willand, mid Devon.
- Contact:
- steve
- Cumulus Author
- Posts: 26701
- Joined: Mon 02 Jun 2008 6:49 pm
- Weather Station: None
- Operating System: None
- Location: Vienne, France
- Contact:
Re: Saratoga templates on Raspberry PI
It's a pseudo-random number usually based on the current date ad time, to stop any caching happening. It could be that your web server doesn't like the extra bit added on. I'm afraid I have no idea what you need to do to it if that is the case, but I'm sure someone who knows what they're talking about will be along shortly. I'll get back to packing the RV...
Steve
-
- Posts: 220
- Joined: Mon 03 Jan 2011 4:27 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 7
- Location: Willand, mid Devon.
- Contact:
Re: Saratoga templates on Raspberry PI
Thanks Steve. The problem doesn't seem to be anything to do with this number in the url. I just requested the realtime.txt manually from a web browser and the pi responded with the file, whether or not I appended a question mark and a number. So, I'm stumped.
I have tried
$SITE['realtimefile'] = './realtime.txt'; // directory and name of Cumulus realtime.txt file
and
$SITE['realtimefile'] = 'realtime.txt'; // directory and name of Cumulus realtime.txt file
in Settings-weather.php
neither works.
I'm guessing its something to do with case sensitivity of filenames on linux but I am darned if I can find it!
I have tried
$SITE['realtimefile'] = './realtime.txt'; // directory and name of Cumulus realtime.txt file
and
$SITE['realtimefile'] = 'realtime.txt'; // directory and name of Cumulus realtime.txt file
in Settings-weather.php
neither works.
I'm guessing its something to do with case sensitivity of filenames on linux but I am darned if I can find it!
-
- Posts: 225
- Joined: Sat 27 Aug 2016 12:11 am
- Weather Station: Davis vantage pro 2
- Operating System: Debian
- Location: Wickliffe, Ohio
- Contact:
Re: Saratoga templates on Raspberry PI
Now im not using a RPI but i am on a linux system and in my Setting-weather.php i use the absolute path to my realtime file.
Also i am grabbing it from the CumulusMX program dir since it is running on the linux system like /home/me/CumulusMX/realtime.txt
Now if your uploading the realtime.txt to your pi into the web dir try using that say /var/www/realtime.txt or wherever your web root is
For me i have always found using the full path works best. and yes everything is case sensitive
Hope this helps you
Also i am grabbing it from the CumulusMX program dir since it is running on the linux system like /home/me/CumulusMX/realtime.txt
Now if your uploading the realtime.txt to your pi into the web dir try using that say /var/www/realtime.txt or wherever your web root is
For me i have always found using the full path works best. and yes everything is case sensitive
Hope this helps you
Jeff
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
My Site http://wickliffeweather.com/
WeatherUnderground https://www.wunderground.com/personal-w ... KOHYOUNG21
-
- Posts: 220
- Joined: Mon 03 Jan 2011 4:27 pm
- Weather Station: Davis Vantage Pro2
- Operating System: Win 7
- Location: Willand, mid Devon.
- Contact:
Re: Saratoga templates on Raspberry PI
@jlmr731
Many thanks for your suggestion. I am embarrassed to say I had the whole site in a subfolder of \www\html and had forgotten! Quoting the whole path indeed fixed it! Thanks.
Many thanks for your suggestion. I am embarrassed to say I had the whole site in a subfolder of \www\html and had forgotten! Quoting the whole path indeed fixed it! Thanks.
- saratogaWX
- Posts: 1210
- Joined: Wed 06 May 2009 5:02 am
- Weather Station: Davis Vantage Pro Plus
- Operating System: Windows 10 Professional
- Location: Saratoga, CA, USA
- Contact:
Re: Saratoga templates on Raspberry PI
It was likely a request created by ajaxCUwx.js JavaScript. If your website is not located in the document root, then you need to change ajaxCUwx.js to or to have it come from the same directory as the template. The Settings.php settin for applies to the PHP parts of the template.. the ajaxCUwx.js has to be changed separately.
Code: Select all
var realtimeFile = '/realtime.txt'; // URL location of realtime.txt relative to document root of website
Code: Select all
var realtimeFile = './realtime.txt'; // URL location of realtime.txt relative to document root of website
Code: Select all
var realtimeFile = 'realtime.txt'; // URL location of realtime.txt relative to document root of website
Code: Select all
$SITE['realtimefile'] = 'realtime.txt'; // directory and name of Cumulus realtime.txt file