WXforum.net

Web Weather => Weather Website PHP/AJAX scripting => Custom Website Templates => Topic started by: steviebaby59 on April 22, 2018, 12:29:30 PM

Title: get-USNO-sunmoon.php not working
Post by: steviebaby59 on April 22, 2018, 12:29:30 PM
My almanac times have failed to update for several days. I've uploaded all the latest scripts to no avail.

Here is the error I get on the astronomy page:

Warning: Invalid argument supplied for foreach() in /home/a5675/public_html/get-USNO-sunmoon.php on line 359

Warning: Invalid argument supplied for foreach() in /home/a5675/public_html/get-USNO-sunmoon.php on line 368
Sun

Seems like I've ran into this issue before, but I forgot how to resolve it.

Any suggestions?  :roll:

www.empireprairieweather.com
Title: Re: get-USNO-sunmoon.php not working
Post by: Otis on April 22, 2018, 01:51:30 PM
Try taking a look at this thread, it may help.
http://www.wxforum.net/index.php?topic=34279.msg348149#msg348149 (http://www.wxforum.net/index.php?topic=34279.msg348149#msg348149)
Title: Re: get-USNO-sunmoon.php not working
Post by: saratogaWX on April 22, 2018, 01:54:41 PM
In your Settings.php put
Code: [Select]
$SITE['useUSNO'] = false; to use internal calculations instead of the USNO for moon times.

The USNO website is having problems right now.
Title: Re: get-USNO-sunmoon.php not working
Post by: steviebaby59 on April 22, 2018, 04:11:51 PM
Do I just need to add this line? If so, where at in the Settings.php? I couldn't locate a line that resembled this. I tried to add it in different locations. Nothing seemed to help.
Title: Re: get-USNO-sunmoon.php not working
Post by: saratogaWX on April 22, 2018, 09:37:26 PM
Yes, just add the line where you like in Settings.php

You have to have get-USNO-sunmoon.php V3.x installed for it to work.
Title: Re: get-USNO-sunmoon.php not working
Post by: steviebaby59 on April 22, 2018, 11:57:54 PM
OK got it! THANKS! :lol: