I’m also having a problem. My clientraw files, jpgraph, and wxgraphs are all located at /wx/
My config files is set as follows:
//where are your clientraw*-files and JPGraph relative to where this file is
//note you should only need to change the jpgraph directory if you do not use standard names
$hostloc = “${WEBROOT}/”; //must have trailing slash
$jploc = “${WEBROOT}/wx/jpgraph-1.22/src/”; //must have trailing slash
If I try to load a image from the wxgraphs directory I get a page not found error. I can see the file is there when I ftp to the same directory. Any idea what I did wrong?
Yes, all files are under /wx/ I changed the WEBROOT to poit to /wx/ but still get the files not found error when I try to access any of the image files in the wxgraph folder
Use the rain_1hr.php in an image tag, like in the directions above.
And if you are getting a file not found error (I am too) then make sure the file is there. If it is there it may not work but you should not get a file not found error.
I deleted the wxgraphs and jpgraph-1.22 directories. I downloaded fresh copies and uploaded them to my web site. I put test.php and hardpath.php in wxgraphs and jpgraphs/ttf/
Both jpgraph-1.22 and wxgraphs can be accessed by my browsers
All my weather files are located in /wx
My graphsconf.php in the wxgraphs folder looks like this:
//where are your clientraw*-files and JPGraph relative to where this file is
//note you should only need to change the jpgraph directory if you do not use standard names
$hostloc = “${/wx}/”; //must have trailing slash
$jploc = “${WEBROOT}/jpgraph-1.22/src/”; //must have trailing slash
My jpg-config.inc.php in the jpgraph-x.xx/src folder looks like this
// TTF_DIR:
// Directory where TTF fonts can be found. Must end with ‘/’
//
// The default values used if these defines are left commented out are:
//
// UNIX:
// CACHE_DIR /tmp/jpgraph_cache/
TTF_DIR /home/content/d/a/f/dafuser/html/wx/jpgraph-1.22/ttf/
// MBTTF_DIR /usr/share/fonts/ja/TrueType/
//
// WINDOWS:
// CACHE_DIR $SERVER_TEMP/jpgraph_cache/
// TTF_DIR $SERVER_SYSTEMROOT/fonts/
// MBTTF_DIR $SERVER_SYSTEMROOT/fonts/
//
//------------------------------------------------------------------------
// DEFINE(“CACHE_DIR”,“/tmp/jpgraph_cache/”);
DEFINE(“TTF_DIR”,“/home/content/d/a/f/dafuser/html/wx/jpgraph-1.22/ttf/”);
// DEFINE(“MBTTF_DIR”,“/usr/share/fonts/ja/TrueType/”);
Maybe a hint for people who have a webhost in safemode (just like me)
Only use abolute paths, like the hardpath one.
So in graphsconf.php the lines to your jpgraph and clientraw dir, remove the webhost part ( ${WEBROOT}/ ) and just write out the full path.
That does the job!
I gave that a try but still get the same error where it looks like it can’t find the clientraw files. They are in the /wx directory.
<?php
// Obtain Basic Environment
$WEBROOT = $_SERVER['DOCUMENT_ROOT'];
//==========================================
//where are your clientraw*-files and JPGraph relative to where this file is
//note you should only need to change the jpgraph directory if you do not use standard names
$hostloc = /home/content/d/a/f/dafuser/html/wx/; //must have trailing slash
$jploc = "/home/content/d/a/f/dafuser/html/wx/jpgraph-1.22/src/"; //must have trailing slash
Advice first: I (evidently) have a windows server, and if I call my fonts folder ttf as instructed here, something in the code interprets the “\t” as a tab which results in the path to the font folder becoming corrupt. I renamed ttf to fonts and lots of stuff immediately started to work…
These are the relevant lines from jpg-config.inc.php:
//------------------------------------------------------------------------
// DEFINE(“CACHE_DIR”,“/tmp/jpgraph_cache/”);
DEFINE(“TTF_DIR”,“e:\domains\k\kingsteignton-weather.co.uk\user\htdocs\jpgraph-1.22\fonts/”);
// DEFINE(“MBTTF_DIR”,“/usr/share/fonts/ja/TrueType/”);
I’ve just checked my files (I run Apache on Windows here as a test server) and my paths are defined with forward slashes ‘/’ not the usual backslash and it works, and yes it should reference the drive letter on Windows.