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 4017) - 17 March 2024

Legacy Cumulus 1 release v1.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

.htaccess missing. How to find it?

Other discussion about creating web sites for Cumulus that doesn't have a specific subforum

Moderator: daj

Post Reply
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

.htaccess missing. How to find it?

Post by RayProudfoot »

I've ported my website to a new host and everything seems okay expect for Local Noon. This is calculated by a piece of PHP supplied by a fellow Cumulus user and resides in indexT.html on www.cheadlehulmeweather.co.uk

This is the result of running it. Red because I presume I was rejected.

<?php
// Calculate Noon from Cumulus SR & SS */
error_reporting(0);
date_default_timezone_set("Europe/London");
$sr = "07:02";
$ss = "16:43";
$sr = strtotime($sr);
$ss = strtotime($ss);
$dl = (($ss - $sr)/2 + $sr);
$suntransit = date("H:i", $dl);
?>

I suspect the missing .htaccess is the cause. How can I resolve it? I can't even find it on my Cumulus folder.
Cheers,
Ray, Cheshire.

Image
freddie
Posts: 2434
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: .htaccess missing. How to find it?

Post by freddie »

Is PHP enabled on your server?
Freddie
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: .htaccess missing. How to find it?

Post by sfws »

Ray
Maybe .htaccess was outside the was "www" structure because you don't want it to be visible to your users, and now needs to be outside the "public_html" or "www" or whatever on new server. I'm guessing you did a FTF of only what was within that structure?
If so, you can FTF from Steve's server and FTF onto new server?

I note PHP is working for you on www.cheadlehulmeweather.co.uk/datasummary.php
freddie
Posts: 2434
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: .htaccess missing. How to find it?

Post by freddie »

freddie wrote:Is PHP enabled on your server?
I asked this because there were non-processed PHP constructs visible in the "view source" for your home page. As sfws says, PHP is enabled because you have other pages that use it. Perhaps the web server isn't processing the PHP constructs in your home page because it doesn't know it has to? One way of doing this is to tell the web server to parse all pages for PHP code, rather than just the ones whose names end in "php". I guess this is what your .htaccess file was doing? N.B: some hosting companies don't allow you to use .htaccess files, so you may like to check that aspect too.
Freddie
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: .htaccess missing. How to find it?

Post by RayProudfoot »

Gents, I'm very grateful for your help. The problem has been solved by the people at HostPresto.

I did find a .htaccess file on Steve's server and downloaded it before uploading to HostPresto. But still no joy.

I raised a ticket with them and they replied saying they had modified it to work with HTML on their servers. It's now fixed.

As you probably gather I'm a novice when it comes to this stuff. Nothing bad has happened to my site in 10 years so it must be reasonably robust.
Cheers,
Ray, Cheshire.

Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: .htaccess missing. How to find it?

Post by sfws »

One more minor point Ray

On your home page (line 258 or so)

Code: Select all

<image src='http://api.sat24.com
should be

Code: Select all

<img src='http://api.sat24.com
@freddie
When I checked before composing my previous post, the day night image which uses PHP was working on his home page http://www.cheadlehulmeweather.co.uk/index.htm successfully.
I don't know whether Ray had progressed his .htaccess between your earlier and my earlier posts.
freddie
Posts: 2434
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: .htaccess missing. How to find it?

Post by freddie »

sfws wrote:@freddie
When I checked before composing my previous post, the day night image which uses PHP was working on his home page http://www.cheadlehulmeweather.co.uk/index.htm successfully.
I don't know whether Ray had progressed his .htaccess between your earlier and my earlier posts.
Probably, because it wasn't working when I looked - you could see the PHP statements when you viewed the page source, which is a classic signal that the page wasn't being processed by the PHP parser.
Freddie
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: .htaccess missing. How to find it?

Post by RayProudfoot »

sfws wrote:One more minor point Ray

On your home page (line 258 or so)

Code: Select all

<image src='http://api.sat24.com
should be

Code: Select all

<img src='http://api.sat24.com
What it is to have the eyes of a hawk! Thanks! :clap:
Cheers,
Ray, Cheshire.

Image
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: .htaccess missing. How to find it?

Post by Mapantz »

RayProudfoot wrote:
What it is to have the eyes of a hawk! Thanks! :clap:
Next job .. make it all https :lol:
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: .htaccess missing. How to find it?

Post by RayProudfoot »

Mapantz wrote: Next job .. make it all https :lol:
No chance. Bloody daft having weather sites that don’t even have a cookie having to be ‘secure’. I’ve gone through enough today. I need a rest.
Cheers,
Ray, Cheshire.

Image
Mapantz
Posts: 1774
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: .htaccess missing. How to find it?

Post by Mapantz »

RayProudfoot wrote:
Mapantz wrote: Next job .. make it all https :lol:
No chance. Bloody daft having weather sites that don’t even have a cookie having to be ‘secure’. I’ve gone through enough today. I need a rest.
Fair enough! :lol:

Your site at the moment is on an endless load. It looks like en.sat24.com is not working for you.
Image
RayProudfoot
Posts: 3372
Joined: Wed 06 May 2009 6:29 pm
Weather Station: Davis VP2 with Daytime FARS
Operating System: Windows XP SP3
Location: Cheadle Hulme, Cheshire, England
Contact:

Re: .htaccess missing. How to find it?

Post by RayProudfoot »

They offer a free service for the satellite images and they do become unavailable occasionally. It's probably them rather than anything on my site. Other than changing image to img I haven't changed anything pointing to sat24 for ages.
Cheers,
Ray, Cheshire.

Image
Post Reply