Page 4 of 7

Re: Moon Phases

Posted: Fri 11 Dec 2015 8:39 pm
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!

Re: Moon Phases

Posted: Fri 11 Dec 2015 8:43 pm
by mcrossley
Can you perform the same copy OK from the command line?

Re: Moon Phases

Posted: Fri 11 Dec 2015 8:44 pm
by mcrossley
Not sure how MX does local copies, but there isn't a file called /var/www/moonphasetag.phptmp left around is there?

Re: Moon Phases

Posted: Fri 11 Dec 2015 8:52 pm
by richard_newberry
No there isnt. I will try the command line cp

Re: Moon Phases

Posted: Fri 11 Dec 2015 8:56 pm
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.

Re: Moon Phases

Posted: Fri 11 Dec 2015 9:14 pm
by richard_newberry
No it wasn't now working now....

Re: Moon Phases

Posted: Fri 11 Dec 2015 11:37 pm
by water01
So, if you don't mind me asking what changed?

Re: Moon Phases

Posted: Sat 12 Dec 2015 10:27 am
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.

Re: Moon Phases

Posted: Sat 12 Dec 2015 10:54 am
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.

Re: Moon Phases

Posted: Sat 12 Dec 2015 11:03 am
by richard_newberry
I cant see your file either.

I will attach it from directory /var/www

Re: Moon Phases

Posted: Sat 12 Dec 2015 11:15 am
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.

Re: Moon Phases

Posted: Sat 12 Dec 2015 11:17 am
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'.

Re: Moon Phases

Posted: Sat 12 Dec 2015 11:24 am
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.

Re: Moon Phases

Posted: Sat 12 Dec 2015 12:15 pm
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.

Re: Moon Phases

Posted: Sat 12 Dec 2015 12:26 pm
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