Weather Astronomy Page

My wxastronomy page is not showing. https://sekywx.com/wxastronomy.php
The page opens is says ‘Date must be before Mon, 13 Nov 2023 04:27:00 -0500’ any ideas on why this is happening.

Is there anything in this thread that helps? Astronomy data is incorrect

Check your status page, your missing one program and some need updates.

Normally thhis message occurs when the new-moon dates in common.php are old.
The original version of the script had a last “new-moon” for 2023.

But your version of common.php is recent and has dates until 2030, so this error should not occur.

Just hope that @ktrue visits today,

Wim

If this version is being used Ballaugh Weather - Sun, Moon, Seasons then the include-wxastronomy.php needs updating

You’re using the alternative wxastronomy.php page (not one of my distributions) and @hcorrin is correct, you need an updated include-wxastronomy.php page as your version has astronomical tables that run out in 2023 (hence the message you see).

The current common.php from the template distribution is not used by the script (but it does have tables that run through 2030).

BTW… along a similar issue, older versions that 6.95h of the alternative ajax-dashboard scripts by Burnsville Weather have the same problem.

include-wxastronomy.zip (18.5 KB)
this is the one i have

Thank you so very much.

Hello Ken, I think I have it working now, but I get a couple of warnings at the top of the page that I don’t understand. Any ideas? Thanks in advance.

The two messages:

Warning: Undefined variable $moontransittime in /home4/inkspot/public_html/include-wxastronomy.php on line 297

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home4/inkspot/public_html/include-wxastronomy.php on line 297

are because testtags.php didn’t have a

$moontransittime = '%moontransittime%'; // Moon transit time
$moontransit = '%moontransit%'; // Moon transit date time

entry in testtags.txt
You can update your testtags.txt template file from the attached.
testtags.txt (52.7 KB)

I’m linking to this post to ask you why on my site there’s still “spring” instead of “summer”, what could it be?
https://www.meteosantangelo.it/dash/wxastronomy1.php
Thank you

Even using your version with ?lang=en shows the translated PRIMAVERA which should have been SPRING.
Someone changed the constants used which better be left untranslated.
That caused to typing errors later on.

Check line 342

   case ($date< $DecSolstice     ): $currentSeason = $SITE['latitude' ]<0 ? 'Primavera' : 'Autunno'; break;

IMHO it should read

   case ($date< $dateDecSol     ): $currentSeason = $SITE['latitude' ]<0 ? 'Primavera' : 'Autunno'; break;

And line 340 has a similar typo,

   case ($date< $JunSolstice     ): $currentSeason = $SITE['latitude' ]<0 ? 'Autunno' : 'Primavera'; break;

change it to

   case ($date< $dateJunSol     ): $currentSeason = $SITE['latitude' ]<0 ? 'Autunno' : 'Primavera'; break;

Just try that, succes,
Wim

I made the two changes, now it gives me Winter!

Quite a long thread over here:

Sorry, it can not give you “Winter” as someone changed all kind of PHP-instructions trying to change the wording to Spanish.

Also the lines 322-326 have to be updated also similar as they are updated in the .zip version
In your version, after end of 2023, the script uses the default in line 348, which is “Inverno”

   // if this happens then testtags.php has not been set up !!
   if ($dateMarEqu===false) $dateMarEqu = strtotime("21:25 UTC March 20 2023");
   if ($dateJunSol===false) $dateJunSol = strtotime("14:58 UTC June 21 2023");
   if ($dateSepEqu===false) $dateSepEqu = strtotime("06:51 UTC September 23 2023");
   if ($dateDecSol===false) $dateDecSol = strtotime("03:28 UTC December 22 2023");

If you would first try to use the version from the zip and make the script correct working in English.
Then you can change the words or better use the built in language translation.

Wim

Ok, I can try the zip version, but where do I find the latest working version?
Thank you

The zip I posted is a working version you initially just need to change lines 75 and 76 to you lat long and line 80 to your testtags.php location that should get an English version up and running then you can sort the language out

Ok, great, it works now, thank you!

1 Like

The errors on the page

Warning: Undefined variable $moontransittime in /home4/inkspot/public_html/include-wxastronomy.php on line 297

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /home4/inkspot/public_html/include-wxastronomy.php on line 297

are explained / solved
→ here Is there a wxastronomy update

Succes,
Wim

The current view is hard coded lat and long around line 603-606 currently the section of the line shows
lat=54%B333%27&ns=North&lon=4%B523%27&ew=West
and the section needs changing to
lat=45%B523%27&ns=North&lon=12%B013%27&ew=East

there is also a UK at the end which needs converting to Italy and should look like below

<a href="https://www.fourmilab.ch/cgi-bin/Earth" target="_blank" title="Off Site"><img src="https://www.fourmilab.ch/cgi-bin/Earth?img=nasa.evif&amp;imgsize=500&amp;dynimg=y&amp;opt=-l&amp;lat=45%B523%27&amp;ns=North&amp;lon=12%B013%27&amp;ew=East&amp;alt=35785&amp;tle=&amp;date=0&amp;utc=&amp;jd=" width="<?php echo $divWidth?>" height="<?php echo $divWidth?>" alt="Italy Day-Night Globe"/></a>
you have translated current view but its pointing at Unito (UK) not Italy