Author Topic: Trying to Update my wxastromony page having trouble finding sunposa.php script  (Read 409 times)

0 Members and 1 Guest are viewing this topic.

Offline AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Hi,

I am trying to update my weather astronomy page and I am looking for the sunposa.php script so I can display a image like this



I am having trouble finding the script and the necessary related files so I can add it here http://www.pepperridgenorthvalley.com/links.php#almac on website.

Jeanette.
"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
It's included in the Alternative Dashboard set https://saratoga-weather.org/scripts-legacy.php#scott
You'll need JPgraph installed (V4.4.2) and some images from the alternative dashboard .zip to make it work.
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 AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Hi Ken,

You said,

It's included in the Alternative Dashboard set https://saratoga-weather.org/scripts-legacy.php#scott
You'll need JPgraph installed (V4.4.2) and some images from the alternative dashboard .zip to make it work.

I downloaded that set you mentioned and was able to fix my cloudbase.php from that and I downloaded JPgragh (V4.4.2) too but I cannot find the sunposa.php script itself within that set that is the problem I has not been able to resolve.

Jeanette
"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Ahhh... my bad.. The sunposa.php was part of the enhanced wxastronomy.php page (that also used some images from the alternative dashboard set)

Download sunposa.php from my site and customize it for your setup.
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 AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Thanks Ken,
 I am trying to get to work but I get this error
Code: [Select]
Catchable fatal error: Argument 1 passed to JpGraphException::defaultHandler() must be an instance of Throwable, instance of JpGraphExceptionL given in /home/pepperr/public_html/jpgraph-4.4.2/src/jpgraph_errhandler.inc.php on line 158
Also Does it need a cache file to begin with


Jeanette
« Last Edit: March 10, 2024, 07:18:42 PM by AZmonsooncats »
"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I'd suggest you turn off JPgraph caching in the jpgraph-4.4.2/src/jpg-config.inc.php
Quote
define('USE_CACHE',false);

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 AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Ken here's that file it appears to be set that way is there something else that could be causing the error?


Code: [Select]
<?php
//=======================================================================
// File:        JPG-CONFIG.INC
// Description: Configuration file for JpGraph library
// Created:     2004-03-27
// Ver:         $Id: jpg-config.inc.php 1871 2009-09-29 05:56:39Z ljp $
//
// Copyright (c) Asial Corporation. All rights reserved.
//========================================================================


//------------------------------------------------------------------------
// Directories for cache and font directory.
//
// CACHE_DIR:
// The full absolute name of the directory to be used to store the
// cached image files. This directory will not be used if the USE_CACHE
// define (further down) is false. If you enable the cache please note that
// this directory MUST be readable and writable for the process running PHP.
// Must end with &#39;/&#39;
//
// TTF_DIR:
// Directory where TTF fonts can be found. Must end with &#39;/&#39;
//
// The default values used if these defines are left commented out are:
//
// UNIX:
//   CACHE_DIR /tmp/jpgraph_cache/
//   TTF_DIR   /usr/share/fonts/truetype/
//   MBTTF_DIR /usr/share/fonts/truetype/
//
// WINDOWS:
//   CACHE_DIR $SERVER_TEMP/jpgraph_cache/
//   TTF_DIR   $SERVER_SYSTEMROOT/fonts/
//   MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
//
//------------------------------------------------------------------------
// define(&#39;CACHE_DIR&#39;,&#39;/tmp/jpgraph_cache/&#39;);
// define(&#39;TTF_DIR&#39;,&#39;/usr/share/fonts/TrueType/&#39;);
// define(&#39;MBTTF_DIR&#39;,&#39;/usr/share/fonts/TrueType/&#39;);

//-------------------------------------------------------------------------
// Cache directory specification for use with CSIM graphs that are
// using the cache.
// The directory must be the filesysystem name as seen by PHP
// and the &#39;http&#39; version must be the same directory but as
// seen by the HTTP server relative to the &#39;htdocs&#39; ddirectory.
// If a relative path is specified it is taken to be relative from where
// the image script is executed.
// Note: The default setting is to create a subdirectory in the
// directory from where the image script is executed and store all files
// there. As ususal this directory must be writeable by the PHP process.
define(&#39;CSIMCACHE_DIR&#39;,&#39;csimcache/&#39;);
define(&#39;CSIMCACHE_HTTP_DIR&#39;,&#39;csimcache/&#39;);

//------------------------------------------------------------------------
// Various JpGraph Settings. Adjust accordingly to your
// preferences. Note that cache functionality is turned off by
// default (Enable by setting USE_CACHE to true)
//------------------------------------------------------------------------

// Deafult locale for error messages.
// This defaults to English = &#39;en&#39;
define(&#39;DEFAULT_ERR_LOCALE&#39;,&#39;en&#39;);

// Deafult graphic format set to &#39;auto&#39; which will automatically
// choose the best available format in the order png,gif,jpeg
// (The supported format depends on what your PHP installation supports)
define(&#39;DEFAULT_GFORMAT&#39;,&#39;auto&#39;);

// Should the cache be used at all? By setting this to false no
// files will be generated in the cache directory.
// The difference from READ_CACHE being that setting READ_CACHE to
// false will still create the image in the cache directory
// just not use it. By setting USE_CACHE=false no files will even
// be generated in the cache directory.
define(&#39;USE_CACHE&#39;,false);

// Should we try to find an image in the cache before generating it?
// Set this define to false to bypass the reading of the cache and always
// regenerate the image. Note that even if reading the cache is
// disabled the cached will still be updated with the newly generated
// image. Set also &#39;USE_CACHE&#39; below.
define(&#39;READ_CACHE&#39;,true);

// Determine if the error handler should be image based or purely
// text based. Image based makes it easier since the script will
// always return an image even in case of errors.
define(&#39;USE_IMAGE_ERROR_HANDLER&#39;,true);

// Should the library examine the global php_errmsg string and convert
// any error in it to a graphical representation. This is handy for the
// occasions when, for example, header files cannot be found and this results
// in the graph not being created and just a &#39;red-cross&#39; image would be seen.
// This should be turned off for a production site.
define(&#39;CATCH_PHPERRMSG&#39;,true);

// Determine if the library should also setup the default PHP
// error handler to generate a graphic error mesage. This is useful
// during development to be able to see the error message as an image
// instead as a &#39;red-cross&#39; in a page where an image is expected.
define(&#39;INSTALL_PHP_ERR_HANDLER&#39;,false);

// Should usage of deprecated functions and parameters give a fatal error?
// (Useful to check if code is future proof.)
define(&#39;ERR_DEPRECATED&#39;,true);

// The builtin GD function imagettfbbox() fuction which calculates the bounding box for
// text using TTF fonts is buggy. By setting this define to true the library
// uses its own compensation for this bug. However this will give a
// slightly different visual apparance than not using this compensation.
// Enabling this compensation will in general give text a bit more space to more
// truly reflect the actual bounding box which is a bit larger than what the
// GD function thinks.
define(&#39;USE_LIBRARY_IMAGETTFBBOX&#39;,true);

//------------------------------------------------------------------------
// The following constants should rarely have to be changed !
//------------------------------------------------------------------------

// What group should the cached file belong to
// (Set to &#39;&#39; will give the default group for the &#39;PHP-user&#39;)
// Please note that the Apache user must be a member of the
// specified group since otherwise it is impossible for Apache
// to set the specified group.
define(&#39;CACHE_FILE_GROUP&#39;,&#39;www&#39;);

// What permissions should the cached file have
// (Set to &#39;&#39; will give the default persmissions for the &#39;PHP-user&#39;)
define(&#39;CACHE_FILE_MOD&#39;,0664);

// Default theme class name
define(&#39;DEFAULT_THEME_CLASS&#39;, &#39;UniversalTheme&#39;);

define(&#39;SUPERSAMPLING&#39;, true);
define(&#39;SUPERSAMPLING_SCALE&#39;, 1);

?>

"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
I'd try copying the Arial set of fonts from c:\windows\Fonts to jpgraph-4.4.2/src/fonts

Your settings above look like mine.
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 AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Ken,

Wasn't sure  #-o at first if that would work, but I tried it and was  I was surprised it worked as the Arial fonts were missing. So it is now working and  here's my sunposa.php Thank you again for your help  [tup]



Now I just have to edit this image into my wxastronomy page, after that I need to fix my uvpage cause the forecast isn't updating anymore.

Jeanette
« Last Edit: March 10, 2024, 10:50:02 PM by AZmonsooncats »
"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline AZmonsooncats

  • Current weather conditions in North Phoenix, Ariz
  • Senior Contributor
  • ****
  • Posts: 248
  • Me & My Little Sis!!
    • Pepper Ridge North Valley  Weather and Lightning
Hi,

Well I finished the updates to the weather-astromony page everything looks good now on my Forecast/Almanac Page with sunposa.pho sun/moon transit working perfectly thanks to Ken's help. The page can be viewed here.

http://www.pepperridgenorthvalley.com/links.php

and specific link to the Almanac section.

http://www.pepperridgenorthvalley.com/links.php#almac

I also figured out the problem with my uv/forecast not updating. The issue was fixed with the latest update of the script from Ken's page.
The page can be viewed here.

http://www.pepperridgenorthvalley.com/uv-page.php

Thank you again, Ken for your updates and help  :grin: =D&gt;

Jeanette
« Last Edit: March 11, 2024, 02:05:13 PM by AZmonsooncats »
"Some dreams are in the night time, And some seem like yesterday
But leaves turn brown and fade, Ships sail away
You long to say a thousand words…but Seasons Change."



CWOP:CW3794, MesoWest: C3794, Facebook: https://www.facebook.com/PepperRidgeNorthValleyWX/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
You're very welcome, Jeanette.  Glad I could assist.
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