cloudy cloudy

Author Topic: JPGraph-Need help configuring  (Read 37586 times)

0 Members and 1 Guest are viewing this topic.

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
JPGraph-Need help configuring
« on: August 28, 2007, 10:33:20 PM »
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





Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,428
  • Davis Vue/Win10
  • Ocean Park, WA.
    • Traveling RV Weather
Re: JPGraph-Need help configuring
« Reply #1 on: August 28, 2007, 11:18:43 PM »
Normally a path would be relative to the server, you would not have URL's listed for the path.  HTH's.   
« Last Edit: August 28, 2007, 11:55:27 PM by NorCal Dan »

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #2 on: August 28, 2007, 11:24:22 PM »
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

Offline NorCal Dan

  • Dan - KJ6RGX
  • Posts: 10,428
  • Davis Vue/Win10
  • Ocean Park, WA.
    • Traveling RV Weather
Re: JPGraph-Need help configuring
« Reply #3 on: August 28, 2007, 11:51:39 PM »
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.


Offline broadstairs

  • Stuart
  • Posts: 7,025
  • Broadstairs, Kent, UK
    • Broadstairs
Re: JPGraph-Need help configuring
« Reply #4 on: August 29, 2007, 06:35:01 AM »
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

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #5 on: August 29, 2007, 02:25:36 PM »
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
« Last Edit: August 29, 2007, 02:41:13 PM by gateway2capecod »

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #6 on: August 29, 2007, 04:09:53 PM »
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

Offline broadstairs

  • Stuart
  • Posts: 7,025
  • Broadstairs, Kent, UK
    • Broadstairs
Re: JPGraph-Need help configuring
« Reply #7 on: August 29, 2007, 04:50:58 PM »
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

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #8 on: August 29, 2007, 05:00:54 PM »
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

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: JPGraph-Need help configuring
« Reply #9 on: August 29, 2007, 05:14:48 PM »
you did install the jpgraph-package from http://www.aditus.nu first, did you ?

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #10 on: August 29, 2007, 05:45:53 PM »
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

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #11 on: August 29, 2007, 05:50:26 PM »
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

Offline broadstairs

  • Stuart
  • Posts: 7,025
  • Broadstairs, Kent, UK
    • Broadstairs
Re: JPGraph-Need help configuring
« Reply #12 on: August 29, 2007, 06:08:18 PM »
you did install the jpgraph-package from http://www.aditus.nu first, did you ?

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

Stuart

Offline gateway2capecod

  • Posts: 1,944
  • West Wareham, Ma. USA
    • West Wareham,Ma Weather
Re: JPGraph-Need help configuring
« Reply #13 on: August 29, 2007, 06:11:31 PM »
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

Offline pinto

  • Posts: 766
  • Belgium
    • weather station Kampenhout
Re: JPGraph-Need help configuring
« Reply #14 on: August 29, 2007, 06:13:15 PM »
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

 

cumulus