Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post for download

$Sharedir Error in wxgraphs.php

Discussion of Ken True's web site templates

Moderator: saratogaWX

acatalano
Posts: 73
Joined: Tue Jun 16, 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

$Sharedir Error in wxgraphs.php

Postby acatalano » Thu Jan 11, 2018 11:10 pm

Yesterday wxgraphs.php was working fine and this evening not at all. I have been adding video files to my website, and pages on which they are viewed. Because there are many, I had been trying to better organize the pages by grouping the php files regarding the animal videos together. This led to a " learning experience " in the definition of file paths in php which was unsuccessful. I did not mess with the $Sharedir variable directly, but somehow in the process I fear I have messed it up so that wxgraphs displays no data, although the menu buttons still display. The specific errors displayed on the page are:

Code: Select all

Notice: Undefined variable: sharedir in /home/www/boulderwx.com/wxgraphs.php on line 133

Warning: include_once(sunhrdata.php): failed to open stream: No such file or directory in /home/www/boulderwx.com/wxgraphs.php on line 133

Warning: include_once(): Failed opening 'sunhrdata.php' for inclusion (include_path='.:/usr/local/php5.6/lib/php') in /home/www/boulderwx.com/wxgraphs.php on line 133


Any ideas as to the problem?
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org

User avatar
saratogaWX
Posts: 849
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: $Sharedir Error in wxgraphs.php

Postby saratogaWX » Fri Jan 12, 2018 12:18 am

Your wxgraphs.php is not the stock one from the template set.
I see (via a view-source ) of wxgraphs.php
<!-- <script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> -->
<!-- Local JQuery library, do not use if your containing page already pulls in a copy of JQuery -->
<!-- <script src="scripts/jquery-1.8.2.min.js"></script> -->
<script src=<br />
<b>Notice</b>: Undefined variable: sharedir in <b>/home/www/boulderwx.com/wxgraphs.php</b> on line <b>119</b><br />
lib/jquery/jquery-latest.min.js></script>
<script src=<br />
<b>Notice</b>: Undefined variable: sharedir in <b>/home/www/boulderwx.com/wxgraphs.php</b> on line <b>120</b><br />
lib/highstock/js/highstock.js></script>
<script src=<br />
<b>Notice</b>: Undefined variable: sharedir in <b>/home/www/boulderwx.com/wxgraphs.php</b> on line <b>121</b><br />
lib/highstock/js/themes/grid.js></script>
<script src=<br />
<b>Notice</b>: Undefined variable: sharedir in <b>/home/www/boulderwx.com/wxgraphs.php</b> on line <b>122</b><br />
js/cumuluscharts.js></script>

so there's likely a missing

$sharedir = './scripts/';

statement in the PHP of wxgraphs.php that is causing the Notice errata (and the page to fail).

acatalano
Posts: 73
Joined: Tue Jun 16, 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

Re: $Sharedir Error in wxgraphs.php

Postby acatalano » Fri Jan 12, 2018 5:05 am

Perhaps I'm downloading the wrong version of the Templates. I downloaded them from https://saratoga-weather.org/wxtemplates/install.php just now to check out the wxgraphs.php file using notepad++. A search within the file did not find any $Sharedir or $Sharedir = '/scripts/' in the file whose latest date /Version is:
//Version 1.04 - 16-Feb-2013 - added Cumulus solar/uv graph displays

It seems like I am getting an old wxgraph.php (and probably others as well). Would you please post a link to the latest set?

I did find another wxgraphs.php but that one appears to be intended for Cumulus, not CumulusMX as it is looking for many png files.
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org

User avatar
saratogaWX
Posts: 849
Joined: Wed May 06, 2009 5:02 am
Weather Station: Davis Vantage Pro Plus
Operating System: Windows XP SP3
Location: Saratoga, CA, USA
Contact:

Re: $Sharedir Error in wxgraphs.php

Postby saratogaWX » Fri Jan 12, 2018 5:31 am

The current Saratoga template plugin for Cumulus only has wxgraphs.php for the Cumulus V1.x, not for CumulusMX.

There is a thread on this forum where Mark Crossley has created scripts for server-based graphs for CumulusMX..
See: viewtopic.php?f=27&t=13189

And viewtopic.php?t=14163#p111210 this thread which seems to have your wxgraphs.php script with $sharedir in it...

I've not included that function in the stock Cumulus plugin as yet... sorry.

acatalano
Posts: 73
Joined: Tue Jun 16, 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

Re: $Sharedir Error in wxgraphs.php

Postby acatalano » Fri Jan 12, 2018 5:35 am

I found the 1.04 version of wxgraphs and installed it. check fetch times shows wxgraphs is up to date. However going to the page indicates that it is looking for many png files in the ./image directory. I have none of these and thought they were associated with the non-MX version of Cumulus. See below.

Code: Select all

Weather Trend Graphs

Graphs generated by Cumulus (3.0.0-b3043)
Temperature / Humidity
./images/temp.png not found.
./images/hum.png not found.
Wind / Barometer
./images/wind.png not found.
./images/windd.png not found.
./images/press.png not found.
Rain
./images/raint.png not found.
./images/rain.png not found.
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org

acatalano
Posts: 73
Joined: Tue Jun 16, 2015 2:07 pm
Weather Station: Davis VP2
Operating System: Raspian, Win7 Pro
Location: Boulder, CO
Contact:

Re: $Sharedir Error in wxgraphs.php

Postby acatalano » Fri Jan 12, 2018 1:34 pm

Well that explains it! What's odd is I had the graphs displaying 2 days ago and took it for granted it worked with CumulusMX. The website started out with the Cumulus supplied pages, so perhaps that has/had something to do with the appearance of the graphs (briefly).
Best Regards,
Anthony Catalano
Boulder, Colorado, USA
Webcam & Weather at:
http://www.boulderwx.com, http://www.apcat.org, http://www.boulderweather.org


Return to “Saratoga Templates”

Who is online

Users browsing this forum: No registered users and 4 guests