IMPORTANT! The server may go down soon - possibly permanently. Please read the latest post in Announcements and News

FTP is broken. I strongly advise all users using my server for their web site to make alternative arrangements.

Outgoing mail is disabled because of the malware on the server. No new forum registrations are currently possible, and mail to the forum administrator will not work.

Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

get-USNO-sunmoon.php error

Discussion of Ken True's web site templates

Moderator: saratogaWX

Sadgit
Posts: 111
Joined: Sun Jan 04, 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

get-USNO-sunmoon.php error

Postby Sadgit » Sat Jul 28, 2018 11:07 am

Hello

I updated the templates as described in another thread and now I get the following errors.. any ideas please?
Warning: Invalid argument supplied for foreach() in /home/xxxx/public_html/weather/get-USNO-sunmoon.php on line 360

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

360
foreach($MoonJSON['sundata'] as $n => $d) {
371
foreach($MoonJSON['moondata'] as $n => $d) {


Cheers
Mark

User avatar
Toxic17
Posts: 697
Joined: Mon May 19, 2014 10:45 pm
Weather Station: Davis VPro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: get-USNO-sunmoon.php error

Postby Toxic17 » Sat Jul 28, 2018 1:52 pm

are you running PHP 7.x?

you also are running an older version of the get-USNO-sunmoon.php

http://www.marton-weather.co.uk/check-f ... w=versions.

Code: Select all

   //  Version 3.00 - 11-Oct-2017 - use cURL for fetch, provide bypass/calculations for api.usno.navy.mil outages
   //  Version 3.01 - 20-Oct-2017 - fix date format for calculated date functions
Regards Simon

https://www.conligwx.org
https://www.conligwx.org/pws/
https://twitter.com/conligwx
Davis Vantage Pro2+ - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS
Image

Sadgit
Posts: 111
Joined: Sun Jan 04, 2009 5:56 pm
Weather Station: Vantage Vue
Operating System: Windows 7
Location: Middlesbrough, England

Re: get-USNO-sunmoon.php error

Postby Sadgit » Sun Jul 29, 2018 1:17 pm

I need to check on the php version.. but I went back to an old version of the file due to the errors


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 3 guests