/===============================================================================================
date_default_timezone_set(‘America/Los_Angeles’); // Set your timezone
//$hostloc needs to be updated to point to where your clientraw*-files are located if not in the root directory
$hostloc = “{$WEBROOT}/sgmgh/”; //if your files are in a sub-directory you must add trailing slash
//note you should only need to change the jpgraph directory if you do not use standard names
$jploc = " {$WEBROOT}/jpgraph 4.4.2/src/"; //must have trailing slash
//Set this variable to either 12 or 24 depending on whether you run Weather Display in 12 or 24 hour mode
$hourmode = “24”;
new graphconf setting screen shot
//===============================================================================================
date_default_timezone_set(‘America/Los_Angeles’); // Set your timezone
//$hostloc needs to be updated to point to where your clientraw*-files are located if not in the root directory
$hostloc = “{$WEBROOT}/sgmgh/”; //if your files are in a sub-directory you must add trailing slash
//note you should only need to change the jpgraph directory if you do not use standard names
$jploc = " {$WEBROOT}/jpgraph-4.4.2/src/"; //must have trailing slash
//Set this variable to either 12 or 24 depending on whether you run Weather Display in 12 or 24 hour mode
$hourmode = “24”;
[13-May-2024 17:00:06 America/Los_Angeles] PHP Warning: file_exists(): open_basedir restriction in effect. File( G:\PleskVhosts\docmarvweather.com\httpdocs/jpgraph-4.4.2/src/jpgraph.php) is not within the allowed path(s): (G:/PleskVhosts/docmarvweather.com;C:\Windows\Temp) in G:\PleskVhosts\docmarvweather.com\httpdocs\wxgraphs\rain_today.php on line 5
Your config and folder structure now look ok
The error is caused by the open_basedir setting you have, you need to talk to your hosting about that ie control panel setting or php.ini file but if shared hosting you probably won’t have access
Hi
the way i got mine to work was to make the directory called wxgraphs, then put the src directory into the wxgraphs directory and point it all to there.
I changed the "open_basedir " option to “none” and now I’m not getting those errors any more but still not seeing any graphs
I noticed the PHP is using “iis”
in the readme file it said he was not going to help with “iis”
// Graphs Package V4.1 14 October 2022
Please note that I am no longer supplying files for use with IIS. If anyone still uses IIS then it will be up to the user to make any required changes. Also I am not supplying any language versions other than English.
Maybe that’s the problem??
Thanks again everyone
Yeah, in earlier versions there was a graphsconf_IIS.php too. . . but IIRC the main problem was that IIS doesn’t like + in filenames so @broadstairs provided graph files called, e.g., temp_dew_hum_24hr.php as well as temp+dew+hum_24hr.php
Yes I decided against supporting IIS as it was too much trouble and I was not going to install it to test. I only run Linux boxes now and no longer use WD either. The graphs are free and if anyone wants to modify them to support IIS go ahead.
Hey Stuart, thanks for helping
When we adjust the “historical-annual-rain” PHP do we need to put the data in as mm or inches?
thanks again for the help
I just looked at the code and I think you have to enter the values in mm and it looks like if you have ‘$rain_conv = 0.0394’ in the graphsconf file then it will convert the mm to in for display. So all I can say is try it and see if I’m right!
Godaddy support said cpanel handles php a lot better so someday I’ll migrate to that and comes with free https, but costs about $200 to move everything
I see several &WEBROOT spots in the graphsconf file?
<?php
// Graphs Package V3.1 5th April 2024
error_reporting(E_ALL);
// Obtain Basic Environment
// in APACHE servers it is always defined
if ( ! isset($_SERVER[‘DOCUMENT_ROOT’] ) ) {
$path_trans = str_replace( ‘\\’, ‘/’, $_SERVER[‘PATH_TRANSLATED’]);
$WEBROOT = substr($path_trans, 0, 0-strlen($_SERVER[‘PHP_SELF’]) );
}
else {
$WEBROOT = $_SERVER[‘DOCUMENT_ROOT’];
}
//===============================================================================================
//PLEASE UPDATE ALL THE VARIABLES IN THIS SECTION BELOW TO YOU REQUIRED VALUES
//===============================================================================================
date_default_timezone_set(‘America/Los_Angeles’); // Set your timezone
//$hostloc needs to be updated to point to where your clientraw-files are located if not in the root directory
$hostloc = “{$WEBROOT}/”; //if your files are in a sub-directory you must add trailing slash
//note you should only need to change the jpgraph directory if you do not use standard names
$jploc = " {$WEBROOT}/jpgraph/src/"; //must have trailing slash
*
Hey thanks for the help,
Im getting this error now
[18-May-2024 11:27:12 America/Los_Angeles] PHP Notice: Undefined variable: DOCROOT in G:\PleskVhosts\docmarvweather.com\httpdocs\wxgraphs\graphsconf.php on line 18
[18-May-2024 11:27:12 America/Los_Angeles] PHP Notice: Undefined variable: DOCROOT in G:\PleskVhosts\docmarvweather.com\httpdocs\wxgraphs\graphsconf.php on line 20