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 4019) - 03 April 2024

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

PHP Error

Discussion of Ken True's web site templates

Moderator: saratogaWX

User avatar
saratogaWX
Posts: 1191
Joined: Wed 06 May 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows 10 Professional
Location: Saratoga, CA, USA
Contact:

Re: PHP Error

Post by saratogaWX »

Since your site is 'invisible' to the internet, it's fairly difficult to diagnose issues based solely on descriptions. :(

You don't have to change get-USNO-sunmoon-inc.php at all. You simply have to have three things set correctly in Settings.php:

the latitude, longitude and cityname. The latitude and longitude numbers must be without '+' signs, and the cityname needs to be less than 20 characters in length (a limitation of the aa.usno.mil site that is used by get-USNO-sunmoon for precise ephemeris data).

In summary, the specific values used in Settings.php (including my sample data) are

Code: Select all

# Station location: latitude, longitude, cityname
$SITE['latitude']		= '37.27153397';    //North=positive, South=negative decimal degrees
$SITE['longitude']		= '-122.02274323';  //East=positive, West=negative decimal degrees
$SITE['cityname']		= 'Saratoga';
User avatar
MackerelSky
Posts: 141
Joined: Fri 01 Apr 2011 8:14 pm
Weather Station: Davis VP2 w/FARS
Operating System: Toshiba Laptop Windows 7 x64
Location: Smethport, Pa.
Contact:

Re: PHP Error

Post by MackerelSky »

sparkynerd wrote:Brad-

I did not change the 'get-USNO-sunmoon.php' script, but I just did. I wasn't aware of the settings in there... thanks!
It's tough to help you out without being able to right click on your page and 'view source' or have a look at your page through an 'inspect element' feature of the modern browsers. Have you had a look there to see if there are any clues?

Brad
Davis VP2/FARS
Cumulus 1.9.4(1092)

McKean Weather
'cause not everyone lives at the airport

Image
User avatar
SpaceWalker
Posts: 67
Joined: Sun 04 Mar 2012 2:54 am
Weather Station: Davis Vantage
Operating System: Windows XP
Location: Eastern-Canada
Contact:

Re: PHP Error

Post by SpaceWalker »

It seems some users did not realized that you were running your pages on a locally installed XAMPP which is a local development environment not accessible from the outside word (or the Internet).

First thing, is it possible to have a 'real' first name for the 'sparkynerd' nickname ... thank you. ;)

You did write in one of the previous messages that you were using the unmodified template set (ie: stock template with no custom code). Other than simple settings, have you modified anything else?

Just to be clear with previous statements, the variable '$moonage' is not produced by the 'get-USNO-sunmoon.php' script - I just double-checked.
I am not sure where to go from here
We have not gone anywhere yet. ;)

For my tests, I am using an unmodified version of the 'ajax-dashboard.php' script (the only modifications I made to this 'bare' installation of the US template set were made in the 'Settings.php' script).

OK, here is something you could add to the 'ajax-dashboard.php' script, just after line # 284 - notice that line # 284 has been commented out by putting the double slashes in front of the line:

Code: Select all

//  if(!isset($moonage))      {$moonage = 'Moon age: '.$mooninfo->age.','.$mooninfo->ill.'%'; }
echo '<br>';
if( !isset( $moonage )) {
  echo '<br>$moonage has not been set yet';
  $moonage = 'Moon age: '.$mooninfo->age.','.$mooninfo->ill.'%';
  echo '<br>$moonage has now been set and contains the following:';
  echo '<br>' . $moonage;
}
else {
  echo '<br>$moonage has already been set and contains the following:';
  echo '<br>' . $moonage;
}
echo '<br><br><br>';
This is what I get, on the top left side of my screen just above the display of the weather data:

Code: Select all

$moonage has not been set yet
$moonage has now been set and contains the following:
Moon age: 2 days, 16 hours, 28 minutes,10%
The information displayed for the moon age will vary slightly as you are at a different location and time. Just to check everything, I did a dozen refresh of the browser screen with the same results as every time the 'ajax-dashboard.php' script, the variable '$moonage' gets reinitialized with the data produced by the 'cGetMoonInfo()' function.

What are you getting?
R_o_B
There are no Time and Movement if there is no Space.
There are no Movement and Space without Time.
There are no Space and Time without Movement.
But if one of the three exists also the other two exist.
User avatar
sparkynerd
Posts: 36
Joined: Wed 14 Jan 2015 10:08 pm
Weather Station: Davis Vantage Vue
Operating System: Windows, Linux (various)
Location: United States

Re: PHP Error

Post by sparkynerd »

My first name is Bryan- my weather website is online @ http://isparky.ddns.net:82/weather/wxindex.php, and obviously, the ajax-dashboard is there too @ http://isparky.ddns.net:82/weather/ajax-dashboard.php. I haven't put any custom code in the php pages other that what has been discussed here, unless I messed up somewhere accidentally. After I get everything working, then I will probably tweak / customize more! I added the php code you just suggested, but I don't see any "echoed data" on my page? Just a thought... would it be easier to just load a fresh ajax-dashboard.php? I know, I know... where is the fun in that! Haha!
__________
Davis Vantage Vue
Cumulus MX 3.25.2 b3245
User avatar
MackerelSky
Posts: 141
Joined: Fri 01 Apr 2011 8:14 pm
Weather Station: Davis VP2 w/FARS
Operating System: Toshiba Laptop Windows 7 x64
Location: Smethport, Pa.
Contact:

Re: PHP Error

Post by MackerelSky »

SpaceWalker wrote:It seems some users did not realized that you were running your pages on a locally installed XAMPP which is a local development environment not accessible from the outside word (or the Internet).
And which users that have responded to this thread would that be? Seemed pretty obvious to all of us that run these scripts and it looks like Ken(you know, the guy that wrote most them) knew it also. But to keep "guessing" what might be wrong instead of looking at the scripts errors is pretty much a waste of time.

Brad
Davis VP2/FARS
Cumulus 1.9.4(1092)

McKean Weather
'cause not everyone lives at the airport

Image
User avatar
MackerelSky
Posts: 141
Joined: Fri 01 Apr 2011 8:14 pm
Weather Station: Davis VP2 w/FARS
Operating System: Toshiba Laptop Windows 7 x64
Location: Smethport, Pa.
Contact:

Re: PHP Error

Post by MackerelSky »

sparkynerd wrote:My first name is Bryan- my weather website is online @ http://isparky.ddns.net:82/weather/wxindex.php, and obviously, the ajax-dashboard is there too @ http://isparky.ddns.net:82/weather/ajax-dashboard.php. I haven't put any custom code in the php pages other that what has been discussed here, unless I messed up somewhere accidentally. After I get everything working, then I will probably tweak / customize more! I added the php code you just suggested, but I don't see any "echoed data" on my page? Just a thought... would it be easier to just load a fresh ajax-dashboard.php? I know, I know... where is the fun in that! Haha!
Hey Bryan,

I can't get your wxindex page to load, sure you have the right link? Looks more like a link for your local server and not actually something we can reach.

Brad

Edit: frankly Bryan, I wouldn't even worry about this until you put your site into production on the web. You should still be able to get it looking like you want and when you are ready to put it up, it could very well-most likely correct itself. Enjoy
Davis VP2/FARS
Cumulus 1.9.4(1092)

McKean Weather
'cause not everyone lives at the airport

Image
User avatar
sparkynerd
Posts: 36
Joined: Wed 14 Jan 2015 10:08 pm
Weather Station: Davis Vantage Vue
Operating System: Windows, Linux (various)
Location: United States

Re: PHP Error

Post by sparkynerd »

The link should be correct and I just checked again- I am able to load it from my ipad on a 4g connection. The page is hosted on my own webserver for right now as I am testing it, but it is also accessible via the web. XAMPP is indeed accessible to the outside world with the magic of dynamic dns and port forwarding. I have hosted my own websites from my server in the past, but this is the first weather site.
__________
Davis Vantage Vue
Cumulus MX 3.25.2 b3245
User avatar
PaulMy
Posts: 3834
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: PHP Error

Post by PaulMy »

Oops! Internet Explorer could not connect to isparky.ddns.net:82
Google Search
Is what I get when I try either of the links, both earlier this morning and now....

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
sparkynerd
Posts: 36
Joined: Wed 14 Jan 2015 10:08 pm
Weather Station: Davis Vantage Vue
Operating System: Windows, Linux (various)
Location: United States

Re: PHP Error

Post by sparkynerd »

Ok... it may be your ISP blocking a non-standard port. I will upload the site to my online hosting and I will post a link as soon as its done.
__________
Davis Vantage Vue
Cumulus MX 3.25.2 b3245
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: PHP Error

Post by mcrossley »

I had the same problems connecting too, DNS lookup works (it doesn't always for me with DDNS for some reason), but no response on port 82.
User avatar
sparkynerd
Posts: 36
Joined: Wed 14 Jan 2015 10:08 pm
Weather Station: Davis Vantage Vue
Operating System: Windows, Linux (various)
Location: United States

Re: PHP Error

Post by sparkynerd »

Ok guys- sorry about the trouble with the locally hosted web site. I uploaded my site to my web host. It is located at http://sparkylabs.net/weather/wxindex.php.

Now I seem to have a different problem as you will see on the page - no realtime data... arrrgghhh... it's late here... I'm fried between working on this and a new pfsense firewall. I will check on it in the morning unless the "clue phone" rings before then. :groan:
__________
Davis Vantage Vue
Cumulus MX 3.25.2 b3245
User avatar
PaulMy
Posts: 3834
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: PHP Error

Post by PaulMy »

Your http://sparkylabs.net/weather/index.htm Cumulus template seems to be ok (couldn't see any data change but the time appears to be current with 1 minute interval). Your http://sparkylabs.net/weather/realtime.txt is not current. If you have this file being uploaded and all your settings correct in Cumulus then sorry, I am unable to suggest anything further.

However your http://sparkylabs.net/weather/wxindex.php Saratoga template indicates it is a Weather Display page? http://sparkylabs.net/weather/check-fet ... w=versions. If you want this to be a Cumulus page you will need to download the appropriate Cumulus Plugin template from Ken's site along with CUtags.

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
sparkynerd
Posts: 36
Joined: Wed 14 Jan 2015 10:08 pm
Weather Station: Davis Vantage Vue
Operating System: Windows, Linux (various)
Location: United States

Re: PHP Error

Post by sparkynerd »

Hmmm... I just checked my web host and realtime.txt has not been updated in a while (since first uploading it) but other files have been updated. What can I check here? The realtime data worked before I moved the website. I'm not sure what I did wrong...
However your http://sparkylabs.net/weather/wxindex.php Saratoga template indicates it is a Weather Display page?
I am using Cumulus and not Weather Display. I do have CUtags and I think I downloaded the Cumulus template when I first set this up, but I struggled a bit getting it to work originally, so there may be some extra files? Would I be better off starting over?
__________
Davis Vantage Vue
Cumulus MX 3.25.2 b3245
User avatar
PaulMy
Posts: 3834
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: PHP Error

Post by PaulMy »

In Configuration > Internet settings do you have Enable Realtime, Enable Realtime FTP, Realtime.txt FTP all ticked and Realtime Interval ? secs set?

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
User avatar
PaulMy
Posts: 3834
Joined: Sun 28 Sep 2008 11:54 pm
Weather Station: Davis VP2 Plus 24-Hour FARS
Operating System: Windows8 and Windows10
Location: Komoka, ON Canada
Contact:

Re: PHP Error

Post by PaulMy »

I am using Cumulus and not Weather Display. I do have CUtags and I think I downloaded the Cumulus template when I first set this up, but I struggled a bit getting it to work originally, so there may be some extra files? Would I be better off starting over?
That http://sparkylabs.net/weather/wxindex.php is definitely not a Cumulus based template.
Wrote 60593 bytes to ./cache/template-version-info.txt successfully.
..loaded 408 version descriptors from ./cache/template-version-info.txt file.
..loaded 78 version descriptors for Base-USA.
..loaded 9 version descriptors for WD-plugin.

WD-plugin ajaxWDwx.js Current V2.24 - 2011-12-13 V2.24 - 2011-12-13 2.24 - 13-Dec-2011 -- added useinHg to force baro to inHg for English/Metric selections

Top | Contact Us | Bookmark Page (CTRL-D)
© 2015, Your Weather Website | Weather-Display | Valid XHTML 1.0 | Valid CSS
It may be as simple as getting the Cumulus plugin installed but perhaps best to remove and start over again and get all the applicable settings correct. Don't hesitate to give a shout if you are uncertain or run into difficulty.

Paul
VP2+
C1 www.komokaweather.com/komokaweather-ca
MX https://komokaweather.com/cumulusmx/index.htm /index.html /index.php
MX https://komokaweather.com/cumulusmxwll/index.htm /index.html /index.php
MX https:// komokaweather.com/cumulusmx4/index.htm
Image
Post Reply