JPGraph-Need help configuring

well I downloaded the wxgrapgh and unzipped it to creat the folder with all the “php” files, along with the “graphsconfig.php”, but I am a little confuzed on the paths needed to be entered into the graphsconfig.php and also each actual grapgh.php, such as for example the 'temp_hum.php"

starting with the actual graphsconfig.php, at the top it list this info to be edited:

<?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 = "${WEBROOT}/"; //must have trailing slash $jploc = "${WEBROOT}/jpgraph-1.20.5/src/"; //must have trailing slash so what do I have to change, and what do I change it to? I tried changing the $hostloc-= line to this: $hostloc = "$http://www.gateway2capecod.com/clientraw.txt/";....but this must be wrong can someone please explain exactly what gets entered for the hosloc and the jploc lines? I undestand below this there are also some changes to be made if I am using farienheit, Inches etc for my reading, which I am and know which changes to be made below these lines above. Now for as far as configuring just one of the graph files, which I will keep testing using the tem_hum.php graph till I can actuall see it working, then get the other's configured later. Inside the actual temp_hum.php I see this: <?php //where are your clientraw*-files relative to where this file is include ("graphsconf.php"); include ($jploc."jpgraph.php"); include ($jploc."jpgraph_line.php"); //$clientraw = get_raw("${hostloc}clientraw.txt"); $clientrawextra = get_raw("${hostloc}clientrawextra.txt"); //$clientrawdaily = get_raw ("${hostloc}clientrawdaily.txt"); what needs to be edited in here? I am assuming i need to add my actual clientraw.txt path, which is: http:www.gateway2capecod.com/clientraw.txt...so should I edit each line as follows?... //$clientraw = get_raw("$http://www.gateway2capecod.com/clientraw.txt"); $clientrawextra = get_raw("$http://www.gateway2capecod.com/clientrawextra.txt"); //$clientrawdaily = get_raw ("$http://www.gateway2capecod.comclientrawdaily.txt"); Thanks if anyone can show me the proper paths to make this all work...Chris

Normally a path would be relative to the server, you would not have URL’s listed for the path. HTH’s.

hello dan,

thanks for the reply, but I am really not good at this stuff and just need someone else that has been through setting these up, to help out.I know something is wrong and have tried numerous times to get just one of the the jpgrah’s working, but no luck yet.

eventually I will figure it out, like I always do

I can help with some of it…

$jploc = “${WEBROOT}/jpgraph-1.20.5/src/”; //must have trailing slash

Change the subdir to match your actual install location. If it’s already in $WEBROOT/lpgraph-1.20.5/src/ then you shouldn’t need to change anything.

All the other stuff you posted is referencing these locations, ie. $hostloc and $jploc, so you shouldn’t need to change anything else, at least from what I can see.

If your JPGraph files are already installed as shipped in a sub directory of jpgraph-1.20.5 the dont change anything, if the sub directory has a different name then change that to the correct name. Dont change the first part as the ${WEBROOT} is a global variable which points to your ‘home’ directory on the webserver.

Now for the other bit, if your clientraw files are in the home directory of your webserver then dont change anything, if your clientraw files are in a sub directory for example WDL the change the $hostloc = “${WEBROOT}/”; to $hostloc = “${WEBROOT}/WDL/”;

Note that these are all case sensitive.

Hope that explains what is needed.

Stuart

I unzipped the package and the folder that everything is in is named wxgraphs…so does this entire folder get uploaded to my server as a whole folder?.. or do I open the folder and upload each file one at a time?

the path to where all my files are on my server is http://www.gateway2capecod.com/web/

my clientraw.txt path is : http://www.gateway2capecod.com/clientraw.txt

…if I upload the entire folder to my server, as is, and then try to get one of the graphs to display, these are the errors produced on the page:

http://www.gateway2capecod.com/wxgraphs/temp_hum.php

so still stumped on exactly what needs to be where and what to name the paths to…chris

Hello Again,

I think part of the problem was that when I unzipped the folder, it made the name of the folder with all the graph files, and config file…named to wxgraphs, so I manually changed that name to jpgraph-1.20.5/
now I am seeing this page:

http://www.gateway2capecod.com/jpgraph-1.20.5/

but when clicking on any actual links to a single graph, cannot see them still, just getting error’s

anything else you need for information about what I am doing to solve this problem, let me know. I can also provide scrreenshots if needed

thanks, chris

Right firstly have you installed the JPGraph exactly as it comes on your webserver? If so what is the folder called containing all the JPGraph stuff? Next unpack the actual graphs and upload the wxgraphs folder exactly asis. Then try to go to http://www.gateway2capecod.com/wxgraphs/wxgraphs_test.html and see what happens.

Stuart

hello stuart,

here is a screenshot of the unzipped folder, which is named/default name of wxgraphs and it is showing the path to my server, which I believe is /web/wxgraphs

http://img239.imageshack.us/img239/2554/sshot43ua4.jpg

my problem I believe is I am not entering exactly the correct path for either hostloc or jploc inside the config.php

do I need to change any of the actual other php files, like the temp_hum.php?

thanks, chris

this page: http://www.gateway2capecod.com/wxgraphs/wxgraphs_test.html …loads but no graphs showing

you did install the jpgraph-package from http://www.aditus.nu first, did you ?

hello pinto,

the package I downloaded was a zip file from broadstairs, and it was named “wxgraphs”…I then unzipped it and it created a folder named 'wxgraphs", which has all the php files inside it like:…temp_hum.php, graphsconfig.php, year_rain.php etc etc.

I then so far have uploaded the entire folder to my server, and when you go to this page:
http://www.gateway2capecod.com/wxgraphs/wxgraphs_test.html …the page displays but with no graphs visible.

I believe I need to enter the correct info on the hostloc and jploc area’s of the graphsconfig file, BUT dont know exactly what needs to be entered

if anyone can show a screenshot of their top 10 lines of their graphsconfig.php file to me, perhpas I can figure out my exact info to enter

this is really getting me aggravated…LOL

I have tried doing this , inside the grapghsconfig.php but it still doesnt work and shows error or syntax errors…i tried this, but no luck:

<?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 = "${WEBROOT}/"; //must have trailing slash $jploc = "${/web}/wxgraphs/src/"; //must have trailing slash

after trying to edit the graphconfig.php with this:

<?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 = "${WEBROOT}/"; //must have trailing slash $jploc = "${/web}/wxgraphs/src/"; //must have trailing slash I get this error when trying to view any of my Graph.php's: Parse error: syntax error, unexpected '/' in /virtual/users/e14837-15290/web/wxgraphs2/graphsconf.php on line 8

Well have you installed this package, cos without it nothing works!

Stuart

hello stuart,

when I click on the link for the package you are reffering to…I dont see anything to download there…if I click on the tab on that page that says “download”, there is some- 3 things…that can be downloaded from the download page

what do I need to download?

thanks, chris

fact: the package you installed works fine IF you first install jpgraph from the link I gave you
this package contains the libraries you need for broadstairs package to work

1 install jpgraph itself(download the version you need according to the php-version on your server)
2 install package from broadstairs

else you won’t be able to use those graphs

hello pinto,

thanks for your help…

how do I know which jpgraph php version to download?

I just downloaded the php4 jpgraph1.21b package, and it was a zip file…I unzipped it, and it created a folder named “jpgraph-1.21b”…it’s contents include a docs & src folder, and also a QPL a Read Me And a version file…what parts of this need to be uploaded to my server? and do they get placed into the wxgraphs folder on my server?

hopefully I have php4 and not php5,because if it is incorrect I will need to get the other download

thanks, chris

first you better check your php-version
put folowing code on your server and browse to it


<?php
echo phpversion();
?>

hello pinto,

I also just thought of that and it turns out I have php version 5.1.6 (I used the PHP_verify.php that came with my weather banner wxgraphics downloaded to verify this info)

see info here: http://www.gateway2capecod.com/PHP_verify.php

so I went back and downloaded the jpgrah version 2.2 from the site…

now I unzipped it, and did try to understand what the read me was talking about, but really dont understand it. My question is this…what part of the jpgraph version 2.2 contents do I need to upload to my server? where do I upload them to? do they go into the wxgraphs folder or stay within their own folder? or Am I totally way off with all of this?

just a bit confuzed and need some help…thanks, Chris

here is screenshot image of inside the jpgrah folder contents I have:
http://img158.imageshack.us/img158/3118/sshot50tl9.jpg

what I did was create a folder on my server and called it “jpgraph”, then put only the src folder in “jpgraph”
then browse to yourwebsite/jpgraph/src/Examples/testsuit.php to see if that works
IF it works you can install Stuart’s package

Hello pinto…did all that and it is working…see here:

http://www.gateway2capecod.com/jpgraph/src/Examples/testsuit.php

what do I need to do next?

what do I need to change in my graphconfig.php? which currently looks like this:

<?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 = "${WEBROOT}/"; //must have trailing slash $jploc = "${WEBROOT}/jpgraph-1.20.5/src/"; //must have trailing slash thanks...we are getting closer to success...chris