Author Topic: Astronomy script - Can't get "sunposa.php" running - RESOLVED  (Read 1382 times)

0 Members and 1 Guest are viewing this topic.

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Astronomy script - Can't get "sunposa.php" running - RESOLVED
« on: January 23, 2018, 03:28:06 PM »
I've been trying to get the astronomy script running and have completed all of it except for
the sun position graph, "sunposa.php". Is there a "sunposa.png" graphic? There is a reference to it in the settings section  $pc_cacheFile = 'cache/sunposa.png';

Here's my astronomy page without the sun position graphic.  http://indiantrailweather.com/wxastronomy_new.php

Thanks for all help ...   :grin:
« Last Edit: January 26, 2018, 10:24:40 AM by Breezy »
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Astronomy script - Can't get "sunposa.php" running
« Reply #1 on: January 23, 2018, 06:06:39 PM »
I've been trying to get the astronomy script running and have completed all of it except for
the sun position graph, "sunposa.php". Is there a "sunposa.png" graphic? There is a reference to it in the settings section  $pc_cacheFile = 'cache/sunposa.png';

Here's my astronomy page without the sun position graphic.  http://indiantrailweather.com/wxastronomy_new.php

Thanks for all help ...   :grin:
Here's a place to start, maybe?
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Astronomy script - Can't get "sunposa.php" running
« Reply #2 on: January 23, 2018, 08:59:24 PM »
I reviewed that thread but it dealt with incorrect moon phase. I couldn't locate anything regarding the "sunposa.php" graph.
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline Breezy

  • Indian Trail Weather
  • Forecaster
  • *****
  • Posts: 325
    • Indian Trail Weather
Re: Astronomy script - Can't get "sunposa.php" running
« Reply #3 on: January 26, 2018, 10:20:21 AM »
Here's my current paths to the "jpgraph" files. I've tried many versions of the paths but no luck so far.

Is there a "sunposa.png" image?

###############################################################
#Settings                                                     #
###############################################################
include ("/wxgraphs/graphsconf.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_scatter.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_line.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_date.php");
$clientrawextra = get_raw("${hostloc}clientrawextra.txt");

***************************************************************
Posted by Ken True on the Weather-Watch forum

Quote
Hmmm.. this
Code: [Select]

include ("/wxgraphs/graphsconf.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_scatter.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_line.php");
include ($jploc."/home/baldwinj1/public_html/jpgraph/src/jpgraph_date.php");

doesn't look quite right.  Maybe try
Code: [Select]

include ("./wxgraphs/graphsconf.php");
$jploc = '/home/baldwinj1/public_html/jpgraph/';
include ($jploc."src/jpgraph.php");
include ($jploc."src/jpgraph_scatter.php");
include ($jploc."src/jpgraph_line.php");
include ($jploc."src/jpgraph_date.php");


The "/wxgraphs/graphsconf.php" implied fetching it from the server's root directory (not possible).  "./wxgraphs/graphsconf.php" means fetch from the current directory -- more likely to work.

The $jploc = '/home/baldwinj1/public_html/jpgraph/'; sets the JpGraph main directory to the absolute path to your JpGraph installation.  Then the following include statements should work (and any other include that JpGraph may have internally).

***************************************

Ken's solution works!!!!!!!!!!!
« Last Edit: January 26, 2018, 10:23:53 AM by Breezy »
Jeff

W7-64, Intel Z170A 16 GB RAM
Davis VP2 Plus, Davis Soil Moisture/Temp Sensors, Laser Snow Depth Sensor LR4/Fluke 414D

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: Astronomy script - Can't get "sunposa.php" running
« Reply #4 on: January 26, 2018, 11:04:44 AM »

Ken's solution works!!!!!!!!!!!
Ken's the man!
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Astronomy script - Can't get "sunposa.php" running - RESOLVED
« Reply #5 on: January 26, 2018, 11:18:09 AM »
 :oops: Thanks!
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