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 4018) - 28 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

Moon Phases

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. 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

richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

Yes typo i meant

LOCAL FILENAME /home/cumulus/CumulusMX/web/moonphasetagT.txt
REMOTE FILENAME
/var/www/moonphasetag.php

Still doesnt copied over so ive re tried to copy it over and it doesnt hmm very frustrating!
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon Phases

Post by mcrossley »

Can you perform the same copy OK from the command line?
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon Phases

Post by mcrossley »

Not sure how MX does local copies, but there isn't a file called /var/www/moonphasetag.phptmp left around is there?
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

No there isnt. I will try the command line cp
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
User avatar
mcrossley
Posts: 12695
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Moon Phases

Post by mcrossley »

One other thing to check, do the contents of /home/cumulus/CumulusMX/web/moonphasetagT.txttmp look OK?
That will show if MX is actually processing the file correctly.
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

No it wasn't now working now....
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Moon Phases

Post by water01 »

So, if you don't mind me asking what changed?
David
Image
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

Im still having problems, when the moonphase changes my picture doesnt update with it. Its waxing cresent mean still think its new moon :? Getting really annoyed now.

Dont agree with moon pictures with chmod 666. I know alot of commands in linux but this is puzzling me.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Moon Phases

Post by water01 »

Could you attach a copy of your moonphasetag.php file as I cannot access it, it might give a clue as to what is the problem.
David
Image
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

I cant see your file either.

I will attach it from directory /var/www
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Moon Phases

Post by water01 »

You cannot see mine as I use the PHP webtags file (cumuluswebtags.php) as my site is entirely PHP based.

This is a workaround for people using the standard .html files supplied by Steve to get the moon phase.
David
Image
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

File as requested.

is your moon pictures permissions are 666? if so that's only read and write and not execute.

I will have to put .rtf on the end of the file because of this error 'The extension php is not allowed'.
You do not have the required permissions to view the files attached to this post.
Last edited by richard_newberry on Sat 12 Dec 2015 11:30 am, edited 1 time in total.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

should code
<td rowspan="3"><img src="moonphase.php" alt="Moon" width="64" align="left" border="0" height="64" style="margin: 0px 10px" /></td>

be put after <td class="site_data" style="text-align: left;"><#moonphase></td>

instead of after <td class="site_data" style="text-align: left;"><#moonrise></td>

in /var/www

moonphase.php and moonphasetag.php both have 644 permission.

moon folder has 777 permission and moon pictures have 666 permission.
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
water01
Posts: 3215
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10 64bit
Location: Burnham-on-Sea
Contact:

Re: Moon Phases

Post by water01 »

Right I discovered an error in the code.

I was following the advice on Moon Phase percentages in this Topic https://cumulus.hosiene.co.uk/viewtopic.php?f=27&t=13983 but there is an anomaly in the New moon and Waxing Crescent percentages which you are the first to notice(!!!!)
New Moon 0% - 1%
Waxing Crescent 1% - 49%
i.e both New Moon and Waxing Crescent cannot both be 1% so I have altered it to match Steve's code.

So yours is actually working but the code is wrong.

If you download the zip file from my original post and just replace moonphase.php it should work correctly (I have tested it on my test bench and it works).

As to your Permissions question moon directory is 755 and the files within it are all 644.
David
Image
richard_newberry
Posts: 481
Joined: Tue 12 Apr 2011 10:23 pm
Weather Station: Watson W-8186
Operating System: Raspbian Bookworm & Debian 12
Location: Leicester
Contact:

Re: Moon Phases

Post by richard_newberry »

I ran php /var/www/moonphase.php I get this error

?ÿ?ú(¢PuTTYPuTTY














(¢?ÿÙPHP Warning: imagedestroy() expects parameter 1 to be resource, boolean given in /var/www/moonphase.php on line 71
Desford Weather (at parents)
https://desford-weather.co.uk

Countesthorpe Weather (at mine)
https://countesthorpe-weather.co.uk
Post Reply