Author Topic: What is sunposa.php?  (Read 393 times)

0 Members and 1 Guest are viewing this topic.

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2932
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
What is sunposa.php?
« on: February 03, 2025, 01:06:44 PM »
I have a broken link on my wxastromony page
https://bsmweather.org/wxastronomy.php

sun moon sky position graph


It will not load and when I click on it on my server a lot of errors come up...related to jpgraphs (which I still cannot figure out)

how can I fix it or delete it from the page.

Thanks--remember I am not a programmer.



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1421
  • BismarckWeather.net
    • BismarckWeather.net
Re: What is sunposa.php?
« Reply #1 on: February 03, 2025, 01:16:26 PM »
I believe it's the heart of the wxastronomy page.  But I'm opening your page just fine, no errors.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2932
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: What is sunposa.php?
« Reply #2 on: February 03, 2025, 01:19:59 PM »
I am getting this in the middle of it
Mac/chrome



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9672
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: What is sunposa.php?
« Reply #3 on: February 03, 2025, 01:21:46 PM »
sunposa.php is a script that uses JPgraph to produce a graphic of the current sun and moon data.

Here's mine

To use it without errors, you have to upload (fully) the following directories and contents of

./jpgraph-4.4.2-sce-only/
./moonimg/

into your document root of your website.

You can see if you've done the uploads correctly by viewing https://bsmweather.org/sunposa.php?debug=y
It currently shows
Quote
------------------------------------------------------------------
sunposa.php Version 3.70 - 14-Dec-2024
..debug=y debugging output for sunposa.php.  PHP version 7.4.33

  Status of needed built-in PHP functions:
  function 'imagecreatefrompng()'  is available
  function 'imagecreatefromgif()'  is available
  function 'imagecreatetruecolor()'  is available
  function 'imagecolortransparent()'  is available
  function 'imagettfbbox()'  is available
  function 'imagettftext()'  is available
  function 'gregoriantojd()'  is available
  function 'curl_init()'  is available
  function 'curl_setopt()'  is available
  function 'curl_exec()'  is available
  function 'curl_error()'  is available
  function 'curl_getinfo()'  is available
  function 'curl_close()'  is available

  Settings used:
  lat='44.958018', lon='-93.944947', tz='America/Chicago'
  cacheFileDir='./cache/'
  moonImagePath='./moonimg/NH-moon'
  legendColor='orange' maxElevation='90'
--Warning: moonimg directory does not contain needed images.
  './moonimg/NH-moon14.gif' is missing.
  jpgraph location='./jpgraph-4.4.2-src-only/'
--Warning: JPgraph not found in jploc='./jpgraph-4.4.2-src-only/'
  Using internal calculations for moon data.
  moon image cache './cache/jpmoon.png does not exist.
  sun  image NASA  './cache/tempImg.gif exists.  Updated 2025-02-03 12:04:09
  sun  image cache './cache/jpsun.gif exists.  Updated 2025-02-03 12:04:09

  GD Library is available and has these capabilities:
    GD Version: false
    FreeType Support: true
    FreeType Linkage: false
    GIF Read Support: true
    GIF Create Support: true
    JPEG Support: true
    PNG Support: true
    WBMP Support: true
    XPM Support: true
    XBM Support: true
    WebP Support: true
    BMP Support: true
    TGA Read Support: true
    JIS-mapped Japanese Font Support: false
with the bolded lines showing the missing items.
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 chief-david

  • Educational Weather
  • Forecaster
  • *****
  • Posts: 2932
  • Space Academy for Educators
    • Benilde-St. Margaret's Weather
Re: What is sunposa.php?
« Reply #4 on: February 03, 2025, 01:45:15 PM »
I should let Ken have full reign over my server and clear up all issues



You can't phase me-I teach Middle School.
It's not you-It's WU.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9672
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: What is sunposa.php?
« Reply #5 on: February 06, 2025, 01:17:01 PM »
You are very close to having it work on your site.  I see that ./moonimg/ directory and contents are now on your site.
It's just the JPGraphs files that need attention.

If you're using FileZilla for FTP uploads to your site, just select the ./jpgraph-4.4.2-src-only/ in FileZilla and to a Put/Upload of all the contents.
When successful, you'll find the following directories on your site (with contents):

./jpgraph-4.4.2-src-only/
./jpgraph-4.4.2-src-only/src/
./jpgraph-4.4.2-src-only/src/barcode/
./jpgraph-4.4.2-src-only/src/fonts/
./jpgraph-4.4.2-src-only/src/lang/
./jpgraph-4.4.2-src-only/src/themes/

then sunposa.php will work correctly.
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

 

anything