Author Topic: sunposa.php error  (Read 2032 times)

0 Members and 1 Guest are viewing this topic.

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1688
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
sunposa.php error
« on: November 11, 2024, 11:30:47 PM »
Howdy folks,
I did the latest update for the sun/moon almanac and everything seems to be working except for one image at the top of the page. Upon digging around I found several PHP errors that I wasn't aware I had. I'm somewhat confused as to the root cause but from what testing and probing I have done my diagnosis is some form or Gregorian calendar is missing from the web host. Before I begin the long process of convincing my web host whats missing and why I need it I thought I would run it pass folks a little better versed in code than I am :).
I have attached the errors received when I try to call the particular image.

Thanks In Advance!


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline Vasco

  • Forecaster
  • *****
  • Posts: 602
    • PWS
Re: sunposa.php error
« Reply #1 on: November 12, 2024, 04:53:53 AM »
You need to ask your provider to enable calendar in PHP.

And make sure that your time zone is set correctly in Settings.php. It seems to be set to America/New York - is that right?
« Last Edit: November 12, 2024, 05:23:05 AM by Vasco »
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline weatherbee

  • Senior Contributor
  • ****
  • Posts: 219
    • Sherman Ct. Weather
Re: sunposa.php error
« Reply #2 on: November 12, 2024, 09:55:05 AM »
I see the error for time zone America/New York but it should be America/New_York.
Tom

Offline W Thomas

  • Welcome to my area!
  • Forecaster
  • *****
  • Posts: 1688
  • In Loving Memory Of Hooker The Weather Dog !
    • Smyth-Grayson Weather
Re: sunposa.php error
« Reply #3 on: November 13, 2024, 12:48:19 AM »
Thanks for the help everyone!  I was thinking along the lines of a problem with my host.
I will get started convincing them that this feature needs to be enabled on their end. That should be fun  :grin:


Thanks for pointing my time zone area error


     Best Regards
     Wayne

CWOP CW8217
KVAWHITE22 Wunderground   Davis VUE &  Davis Vantage Pro 2  /   Dedicated Server
GR Level 3 ,Level 2 AE Radars  Weather Display 10.37P  Mid Atlantic Weather Network Member
SkyWarn & Spotter Network 6092

Offline vinesweather

  • Forecaster
  • *****
  • Posts: 363
    • The Vines Weather
Re: sunposa.php error
« Reply #4 on: January 01, 2025, 04:53:45 AM »
Hello
I've noticed an error on my site,

https://vinesweather.com/wxastronomy.php

https://vinesweather.com/sunposa.php

PHP has a calendar enabled.

Any suggestions please?

Chris


Offline Vasco

  • Forecaster
  • *****
  • Posts: 602
    • PWS
Re: sunposa.php error
« Reply #5 on: January 01, 2025, 05:51:34 AM »
Did you upload the jpgraph-4.4.2-src-only directory that comes with the sunposa distribution?
Quote
+  **./jpgraph-4.4.2-src-only/** A source only for [JPGraph 4.4.2](https://jpgraph.net/download/) is included (under [QPL-1.0 license](http://www.opensource.org/licenses/qtpl.php)) for convenience.  The script can be changed to use your existing JPGraph installation if desired.

Then make sure the path to it is correct in sunposa.php
Ecowitt GW1102 (with GW2000) + Weather Display in Windows 10

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9690
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: sunposa.php error
« Reply #6 on: January 01, 2025, 08:25:08 AM »
Running https://vinesweather.com/sunposa.php?debug=y shows
Quote
sunposa.php Version 3.70 - 14-Dec-2024
..debug=y debugging output for sunposa.php.  PHP version 8.1.31

  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='-31.7662916', lon='116.0022814', tz='Australia/Perth'
  cacheFileDir='./cache/'
  moonImagePath='./moonimg/SH-moon'
  legendColor='orange' maxElevation='90'
  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 exists. Updated 2025-01-01 16:28:02
  sun  image NASA  './cache/tempImg.gif exists.  Updated 2025-01-01 21:14:04
  sun  image cache './cache/jpsun.gif exists.  Updated 2025-01-01 21:14:04

  GD Library is available and has these capabilities:
    GD Version: 2.3.3
    FreeType Support: true
    FreeType Linkage: with freetype
    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
    AVIF Support: true
    TGA Read Support: true
    JIS-mapped Japanese Font Support: false
@vasco is correct, you need to upload the entire ./jpgraph-4.4.2-src-only/* directory and subdirectory contents to your website.
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 saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9690
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: sunposa.php error
« Reply #7 on: January 01, 2025, 10:47:49 PM »
If you already have jpgraph-4.4.2 installed, then you can change sunposa.php
Quote
$jploc = './vw/jpgraph-4.4.2-src-only/';  // relative location of jpgraph library
to
Quote
$jploc = './vw/jpgraph-4.4.2/';  // relative location of jpgraph library

assuming that your existing library is in the ./vw/ directory as jpgraph-4.4.2/
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 vinesweather

  • Forecaster
  • *****
  • Posts: 363
    • The Vines Weather
Re: sunposa.php error
« Reply #8 on: January 01, 2025, 11:42:41 PM »
Hi Ken
yup. Got it sorted now. Many thanks for the help.
Chris

 

anything