Author Topic: Is there a wxastronomy update  (Read 13539 times)

0 Members and 1 Guest are viewing this topic.

Offline Weerstation

  • Member
  • *
  • Posts: 43
    • Westland De Poel
Re: Is there a wxastronomy update
« Reply #50 on: October 27, 2022, 08:34:20 AM »
that date for start of spring is the default if the testtags.php is not found or the "$marchequinox =  '%marchequinox%';" is missing from the testtags.txt that creates the php this is assuming you have WD generating it

Code: [Select]
$marchequinox =  '15:34 UTC 20 maart 2022'; // March equinox date

$junesolstice =  '09:15 UTC 21 juni 2022'; // June solstice date

$sepequinox =  '01:04 UTC 23 september 2022'; // September equinox date

$decsolstice =  '21:49 UTC 21 december 2022'; // December solstice date

It seems to be present and all other dates are correct.

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Is there a wxastronomy update
« Reply #51 on: October 27, 2022, 06:17:30 PM »
i wonder if it's a translation issue
to test as soon as the testtags.php is created edit the
Code: [Select]
$marchequinox =  '15:34 UTC 20 maart 2022'; // March equinox dateto
Code: [Select]
$marchequinox =  '15:34 UTC 20 march 2022'; // March equinox date
and upload and check you site before the next normal upload overwrite it, if the correct info is displayed before you next normal update then the translation is the cause

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Is there a wxastronomy update
« Reply #52 on: October 27, 2022, 09:51:35 PM »
There's a simple remedy for WD users.. WD, Setup, Language, Use English for Reports for web files => Yes will ensure that the dates appear in testtags.php with English names.

The alt wxastronomy.php may not handle reverse translation to non-English language.  Guess I'll have to refactor that in :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Is there a wxastronomy update
« Reply #53 on: October 31, 2022, 06:06:48 AM »
The server for the sun stuff appears to be down ie sunspot image and sun moon graphic
« Last Edit: October 31, 2022, 06:08:37 AM by hcorrin »

Online K6GKM

  • CamWX.com
  • Contributor
  • ***
  • Posts: 125
    • CamWX
Re: Is there a wxastronomy update
« Reply #54 on: November 23, 2022, 12:32:05 PM »
Really liking this version of wxastromony, thanks for uploading it.  One issue I've run into, though, is my script saying it's already Winter in the middle of November beneath the sunlit earth.  Dates are correct in testtags.php (as far as I can tell) so I'm not quite sure where the foul-up is.  Any input?  Script at CamWX.com/wxastronomy.php.

Thanks all.
Grant Miles
Camarillo, CA, USA
Owner/Admin - CamWX.com
SKYWARN Spotter
Station Hardware: Davis Vantage Pro2 Plus w/ 24hr FARS
Station Software: Weather Display, Weather Message, FWI Calculator, StartWatch, with social media & messaging automation using Make.com, Twilio, and Brevo.


Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: Is there a wxastronomy update
« Reply #55 on: November 23, 2022, 02:06:29 PM »
I had issues with the seasons showing up correctly which is why I used my own code for that.

https://mymishawakaweather.com/Wxastronomy.php

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Is there a wxastronomy update
« Reply #56 on: November 26, 2022, 12:20:10 PM »
I can't get the sunposa.php to work I get this error.

Quote
Catchable fatal error: Argument 1 passed to JpGraphException::defaultHandler() must be an instance of Throwable, instance of JpGraphExceptionL given in /home/madweather/public_html/jpgraph-4.4.1/src/jpgraph_errhandler.inc.php on line 158

I don't seem to have the sunlight map anymore either. Not sure when these stopped working. The rest of it is working.

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Is there a wxastronomy update
« Reply #57 on: November 26, 2022, 12:42:06 PM »
Are you using the sunposa 2.0.2 see post 31 on page 2 of this thread and is it pointing to the latest jpgragh version

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Is there a wxastronomy update
« Reply #58 on: November 26, 2022, 12:47:15 PM »
You're running some of the Saratoga scripts, but your check-fetch-times.php is so old, it doesn't have additional diagnostics in it to help resolve the problems.

Running  http://www.mad-weather.com/sunposa.php?debug=y

shows
Code: [Select]
Notice: Undefined index: REMOTE_HOST in /home/madweather/public_html/Settings.php on line 35

Notice: Undefined index: allowThemeSwitch in /home/madweather/public_html/Settings.php on line 174

Notice: A non well formed numeric value encountered in /home/madweather/public_html/sunposa.php on line 299

Notice: A non well formed numeric value encountered in /home/madweather/public_html/sunposa.php on line 333

Notice: A non well formed numeric value encountered in /home/madweather/public_html/sunposa.php on line 347

Notice: A non well formed numeric value encountered in /home/madweather/public_html/sunposa.php on line 361

Catchable fatal error: Argument 1 passed to JpGraphException::defaultHandler() must be an instance of Throwable, instance of JpGraphExceptionL given in /home/madweather/public_html/jpgraph-4.4.1/src/jpgraph_errhandler.inc.php on line 158

The "A non well formed numeric value encountered" are likely caused by entries in your Settings.php for $SITE['latitude'] and/or $SITE['longitude'] .. are those entries with decimal period notation (not decimal comma notation)?
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Is there a wxastronomy update
« Reply #59 on: November 26, 2022, 12:57:52 PM »
Latitude and longitude are the correct notation.
Some parts have been updated, but I think I started doing standalone before some of the scripts became standalone!
I know enough to make a real mess of things!
This is still running php5.6. I switched it back after testing my homepage as I wanted to work through other things and also to let people know that the topsites would no longer work after I make the final switch.

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Is there a wxastronomy update
« Reply #60 on: November 26, 2022, 04:42:33 PM »
I've updated the check-fetch-times.php to the latest one.
When I first started building this site, which would have been 2009/2010 I'm not sure there was  a standalone or all the languages, not that I use them. I have thought sometimes that it might be better to start again, but, if I can keep it working I will.
I guess the scripting has got harder now and less people are willing to spend the time.
Enjoy the rest of your weekend everyone.
Rosalind

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Is there a wxastronomy update
« Reply #61 on: November 26, 2022, 05:12:27 PM »
Looking at Settings.php shows
Code: [Select]
$SITE['longitude']        = '-17.194 ';  //East=positive, West=negative decimal degrees  The space at the end of the number (before the closing single-quote) may be what is causing the problem with sunposa.php
Try changing it to
Code: [Select]
$SITE['longitude']        = '-17.194';  //East=positive, West=negative decimal degrees and see if that helps.

Also, the first lines in Settings.php
Code: [Select]
$SITE['REMOTE_ADDR']    = $_SERVER['REMOTE_ADDR'];
$SITE['REMOTE_HOST']    = $_SERVER['REMOTE_HOST'];
$SITE['WEBROOT']        = $_SERVER['DOCUMENT_ROOT'];
$SITE['REQURI']            = $_SERVER['REQUEST_URI'];
$SITE['SERVERNAME']        = $_SERVER['SERVER_NAME'];
should be changed to
Code: [Select]
if(isset($_SERVER['REMOTE_ADDR']))   {$SITE['REMOTE_ADDR'] = $_SERVER['REMOTE_ADDR'];}
if(isset($_SERVER['REMOTE_HOST']))   {$SITE['REMOTE_HOST'] = $_SERVER['REMOTE_HOST'];}
if(isset($_SERVER['DOCUMENT_ROOT'])) {$SITE['WEBROOT'] = $_SERVER['DOCUMENT_ROOT'];}
if(isset($_SERVER['REQUEST_URI']))   {$SITE['REQURI'] = $_SERVER['REQUEST_URI'];}
if(isset($_SERVER['SERVER_NAME']))   {$SITE['SERVERNAME'] = $_SERVER['SERVER_NAME'];}
to avoid the other 'Undefined' Notice errata.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline youngros

  • Contributor
  • ***
  • Posts: 104
    • Sans Souci Weather
Re: Is there a wxastronomy update
« Reply #62 on: November 28, 2022, 06:21:54 AM »
I've made those corrections and now have a black page with a white square in the middle!
I'm getting there slowly.
Thanks

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #63 on: February 08, 2023, 11:14:34 AM »
 Greetings From The CSRA!  Gentlemen, I have read and studied the messages in this thread and have tried to follow Ken's instructions.  I downloaded the files, unzipped the jpgraph file and uploaded all files to my webserver at https://csraweather.org/wxastronomy.php  I am encountering difficulty with the images and the sunposa.php script.  I checked WD/webfiles/testtags.txt and testtags.php and believe the correct tags are there.  Could someone consider pointing me to a resolution of what I obviously did not do correct...SMH...Refer to the attached zip file as reference.  Thank You in advance! [ You are not allowed to view attachments ]

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Is there a wxastronomy update
« Reply #64 on: February 08, 2023, 01:02:16 PM »
Here is a copy of my settings for sunposa.php.

Code: [Select]
#Settings                                                     #
###############################################################
#
$jploc = './jpgraph-4.4.0/';  // relative location of jpgraph library

/*  GLOBAL VARIABLES */
$lat = 47.462625;              //overridden by $SITE['latitude']
//Note! longitude is west negative
$lon = -122.202057;           //overridden by $SITE['longitude'];
$tz = "America/Los_Angeles"; //overridden by $SITE['tz']
$cacheFileDir = './';        //overridden by $SITE['cacheFileDir']
//
$crextrafile = "./clientrawextra.txt"; // set location of WD clientrawextra file
$moonImagePath = './ajax-images/moon/w/NH-moon'; //alternative dashboard moon images
$dtstring   = "M j Y g:ia";         // format for the date & time
#
# you likely do not have to configure the following:
$daycolor   = 'lightskyblue';
$ctlcolor   = 'skyblue:0.6';           // Civil Twilight
$ntlcolor   = 'skyblue:0.6';           // Nautical Twilight
$atlcolor   = 'midnightblue:0.9';           // Astronomical Twilight
$nightcolor = 'midnightblue:0.7';
$dawncolor  = 'lightskyblue:0.4';
$zenith = 90.83333;
###############################################################
#End of settings                                              #
###############################################################

Chuck

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #65 on: February 08, 2023, 03:31:56 PM »
Many Thanks, Chuck!  Checked my sunposa.php and all settings are similar to yours.  Moon and sun images??  Might go and check the moon icon images?  Also, WD/webfiles/clientrawextra.txt is being uploaded by WD....

Online K6GKM

  • CamWX.com
  • Contributor
  • ***
  • Posts: 125
    • CamWX
Re: Is there a wxastronomy update
« Reply #66 on: February 08, 2023, 03:47:10 PM »
I want to say I had similar problems when I implemented this wxastronomy page a while back.  I recall having to track down several sun/moon icon images and tweak the code for the sunposa a bit to get it happy.  I honestly don't really exactly what I did to pacify it. 

BUT...

I can help with the icons. Unzip these five images into your /ajax-images/ folder.  That should fix the broken sun/moon image links.  I'll take a look at the rest of it to see if I can figure out what I tweaked to get the rest of it working.

Also-
Consider embedding the code into a wxnewpage.php to integrate it with the rest of your website.  There's no way to navigate off the page with it standing alone like it is.
« Last Edit: February 08, 2023, 03:48:42 PM by K6GKM »
Grant Miles
Camarillo, CA, USA
Owner/Admin - CamWX.com
SKYWARN Spotter
Station Hardware: Davis Vantage Pro2 Plus w/ 24hr FARS
Station Software: Weather Display, Weather Message, FWI Calculator, StartWatch, with social media & messaging automation using Make.com, Twilio, and Brevo.


Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #67 on: February 08, 2023, 03:58:26 PM »
Thank You, K6GKM!!....I will download these icon images momentarily....also, yeah, I will change and embed code in wxnewpage.php once I get the darned thing up and running!  Thanks again!

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: Is there a wxastronomy update
« Reply #68 on: February 08, 2023, 04:07:06 PM »
Here is my wxastronomy page. Hopefully it will help.

Chuck

Online K6GKM

  • CamWX.com
  • Contributor
  • ***
  • Posts: 125
    • CamWX
Re: Is there a wxastronomy update
« Reply #69 on: February 08, 2023, 04:09:06 PM »
So a bit more information... in trying to run your sunposa.php script (https://csraweather.org/sunposa.php), I get the following PHP warnings:
Code: [Select]
Warning: include(./jpgraph-4.4.0/src/jpgraph.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 126

Warning: include(./jpgraph-4.4.0/src/jpgraph.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 126

Warning: include(): Failed opening './jpgraph-4.4.0/src/jpgraph.php' for inclusion (include_path='.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 126

Warning: include(./jpgraph-4.4.0/src/jpgraph_scatter.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 127

Warning: include(./jpgraph-4.4.0/src/jpgraph_scatter.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 127

Warning: include(): Failed opening './jpgraph-4.4.0/src/jpgraph_scatter.php' for inclusion (include_path='.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 127

Warning: include(./jpgraph-4.4.0/src/jpgraph_line.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 128

Warning: include(./jpgraph-4.4.0/src/jpgraph_line.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 128

Warning: include(): Failed opening './jpgraph-4.4.0/src/jpgraph_line.php' for inclusion (include_path='.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 128

Warning: include(./jpgraph-4.4.0/src/jpgraph_date.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 129

Warning: include(./jpgraph-4.4.0/src/jpgraph_date.php): failed to open stream: No such file or directory in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 129

Warning: include(): Failed opening './jpgraph-4.4.0/src/jpgraph_date.php' for inclusion (include_path='.:/opt/plesk/php/7.4/share/pear') in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 129

Fatal error: Uncaught Error: Class 'Graph' not found in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php:443 Stack trace: #0 {main} thrown in /var/www/vhosts/csrawxaq.com/csrawxorg/sunposa.php on line 443

Is it possible the directory where jpgraph is living is different than what sunposa.php is configured for?  Check
Code: [Select]
$jploc = './jpgraph-4.4.0/';  // relative location of jpgraph library
in your sunposa.php file and make sure it's pointing to the right place.  The script comes preconfigured for jpgraph-4.4.0.  Not sure what you installed, but the current version is 4.4.1  Methinks that might be the issue.
« Last Edit: February 08, 2023, 04:16:53 PM by K6GKM »
Grant Miles
Camarillo, CA, USA
Owner/Admin - CamWX.com
SKYWARN Spotter
Station Hardware: Davis Vantage Pro2 Plus w/ 24hr FARS
Station Software: Weather Display, Weather Message, FWI Calculator, StartWatch, with social media & messaging automation using Make.com, Twilio, and Brevo.


Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #70 on: February 08, 2023, 06:03:59 PM »
Chuck and K6GKM,  Thank You both for your help.  I believe I screwed up by renaming include-wxastronomy.php to wxastronomy.php and uploaded to my server.  I will fix that on my end, when I set up wxnewpage.php.  receiving these warnings when I run sunposa.php now:

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/fonts/truetype/arialbd.ttf) is not within the allowed path(s): (/var/www/vhosts/csrawxaq.com/:/tmp/) in /var/www/vhosts/csrawxaq.com/csrawxorg/jpgraph-4.4.1/src/jpgraph_ttf.inc.php on line 505

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/fonts/truetype/arialbd.ttf) is not within the allowed path(s): (/var/www/vhosts/csrawxaq.com/:/tmp/) in /var/www/vhosts/csrawxaq.com/csrawxorg/jpgraph-4.4.1/src/jpgraph_ttf.inc.php on line 510
JpGraph Error: 25049 Font file "/usr/share/fonts/truetype/arialbd.ttf" is not readable or does not exist.

I will go to Ken's site and download the instructed font files.  I am trying here....Thanks for your help!

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #71 on: February 08, 2023, 06:50:09 PM »
Well, I have got this script up and running at https://csraweather.org/wxastronomy.php.  Struggling with the sun and moon images....SMH, done for the evening...tomorrow is another day....thank you all for your help!!

Offline hcorrin

  • Contributor
  • ***
  • Posts: 128
    • Ballaugh Weather
Re: Is there a wxastronomy update
« Reply #72 on: February 09, 2023, 05:11:59 AM »
The moon images should be located in the Ajax-images folder in you WD-Ajax directory

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #73 on: February 09, 2023, 06:26:07 AM »
hcorrin,
  Thank You for your response!  I realize I do not have the sun and moon images in the Ajax-images directory!  Where do I download the sun-arrow.gif and the moon NH images?

Offline scudwatcher

  • Billy T. Forecaster Webmaster csraweather.net
  • Senior Contributor
  • ****
  • Posts: 157
  • Amateur Radio KC4SRA csraweather.net
    • CSRA Weather
Re: Is there a wxastronomy update
« Reply #74 on: February 09, 2023, 06:38:29 AM »
Good Morning Gentlemen,
  I have found that the moon NH and sun-arrow.gif images were not located in my ajax-images directory!  I downloaded the images from CHUCK (I could have sworn I did this yesterday!) and uploaded to my webserver at https://csraweather.org/wxastronomy.php  I am up and running!  Thanks to all who have helped!