Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member jgillett's Avatar
    Join Date
    Jan 2008
    Location
    Phoenix, AZ
    Posts
    6

    Default Help installing jpgraph for PHP

    The Subject says it all.

    Caveats - I'm not a server guy, even though my profession since 1965 has been computers. Too bad my ColdFusion won't help...

    Anyway, gently, please.

    Thanks.
    John

  2. #2
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Hey John,
    What version of WestHost do you have 3.0 or 4.0? I would assume by you join date here in the forum that it would be 3.0.

    So here is your answer.... This is a simply a php library so in reality you can upload/install it any place you want. If you are on WH 3.0 then if you upload it to the following location then it may make thing easier.
    /usr/local/php/lib/php
    If you have followed the instructions here: http://hem.bredband.net/aditus/chunk...html#id2507336 then you can simply use require_once('jpgraph/jpgraph.php') in any php script you want to use it in.

    If you want to give more details of how you intend to use this then I may be able to give you more details if you are having problems.

    BTW: To find out your include path simply upload a php file with the following code in it.
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    Search the results of that file in a browser for include_path found under Configuration PHP Core.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  3. #3
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Ahh... I just read this in the Install page.
    [Optional] Verify that the paths defined in jpg-config.inc.php corresponds to the server setup. The path to your TTF fonts must be correct. If you get an error saying that some TTF fonts cannot be found or read then the path needs to be adjusted in this configuration file.
    I bet if you are having issues that might be your problem. There are no TTF fonts installed on your system so unless this library comes with them then you may have to deal with that. I did not download the package to check but if that is your issue let me know and I can download and explore more.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  4. #4
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    I really should read all the documentation before I post.

    If you are looking for php.ini file it is located at /etc/php.ini. That is on WH 3.0 if you are dealing with WH 4.0 then it is more complicated. http://forums.westhost.com/showthread.php?t=14325

    It does seem like you have to install the fonts yourself. They suggest getting them from http://corefonts.sourceforge.net/ but we don't have rpm-build. I have no idea if this is "legal", but the times I've needed true type fonts, I have simply uploaded them from my local computer. I bet you know where they are located since you are a computer guy, but just in case anyone else is reading this I located by going to Control panel clicking on Fonts. See those files with a TT icon? Those are what you want. I doubt you need them all. They also suggest a couple other sources for fonts. http://hem.bredband.net/aditus/chunkhtml/ch03s04.html They mention some default paths for fonts on UNIX but we do not have write permissions on those paths... in fact you won't find them on your account and can't create them. You could upload them any place you want really. Maybe in the same directory as the jpgraph library under a font directory. Just make sure you change that TTF_DIR define in jpg-config.inc.php to the location where you uploaded them.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  5. #5
    Junior Member jgillett's Avatar
    Join Date
    Jan 2008
    Location
    Phoenix, AZ
    Posts
    6

    Default

    Quote Originally Posted by wildjokerdesign View Post
    What version of WestHost do you have 3.0 or 4.0? I would assume by you join date here in the forum that it would be 3.0.
    3.0 is correct.
    Quote Originally Posted by wildjokerdesign View Post
    So here is your answer.... This is a simply a php library so in reality you can upload/install it any place you want. If you are on WH 3.0 then if you upload it to the following location then it may make thing easier.
    /usr/local/php/lib/php
    Will do as soon as I finish this.
    Quote Originally Posted by wildjokerdesign View Post
    If you have followed the instructions here: http://hem.bredband.net/aditus/chunk...html#id2507336 then you can simply use require_once('jpgraph/jpgraph.php') in any php script you want to use it in.
    Jeez - looked all over the site for instructions. The readme in the D/L says manual included (not!).
    Quote Originally Posted by wildjokerdesign View Post
    If you want to give more details of how you intend to use this then I may be able to give you more details if you are having problems.
    Not enough finished yet to know if I'm having problems!

    However, if you'll see http://jcweather.us/NSLog.php, click the Add-Ons tab, and scroll to the bottom. Those graphs are what I'm after.
    Quote Originally Posted by wildjokerdesign View Post
    BTW: To find out your include path simply upload a php file with the following code in it.
    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    Already done (http://tiggrsuccess.com/info.php).

    Also appears that the required GD is enabled.

    Thanks!
    John

  6. #6
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Ahh... OK.. I went ahead and downloaded the strikes.php files. Looks like the default settings in those files are expecting your jgraph libraries to be uploaded to /jpgraph-2.3.4/src/ in the directory where you have the strikes.php files located and then the true type fonts are in /lightning/ also within the directory where strikes.php is located. They actually supply the .ttf file used in the zip file. Both of these can be changed if you want to.
    PHP Code:
    $jploc $WEBROOT "/jpgraph-2.3.4/src/";      // Where your jpgraph is installed

    DEFINE ("TTF_DIR"$WEBROOT "/lightning/" );  // Where truetype font file is located (ariali.ttf) 
    They actually mention an NSGraph.txt file also in the config of the file but not sure where you get that. Maybe you already have that. They expect that to be in /lightning/ also. That should be all you need to deal with I think.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  7. #7
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    Also appears that the required GD is enabled.
    Yep it is! Actually if a host does not have GD enabled then they are really in the dark ages. I think just about every CMS, forum or blog program out there uses it now.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  8. #8
    Moderator wildjokerdesign's Avatar
    Join Date
    Jun 2003
    Location
    Kansas City Mo
    Posts
    5,721

    Default

    BTW: You might want to change the name or remove the info.php file on your account now that you have the info and since you posted it publicly now. Best not to let prying eyes see this. Really once they figure out you are on WestHost it should be pretty easy to determine this info but always best to be safe and it does have details of your set up.
    Shawn
    Please remember your charity of choice: http://www.redcross.org

    Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson

  9. #9
    Junior Member jgillett's Avatar
    Join Date
    Jan 2008
    Location
    Phoenix, AZ
    Posts
    6

    Default

    Quote Originally Posted by wildjokerdesign View Post
    Ahh... OK.. I went ahead and downloaded the strikes.php files. Looks like the default settings in those files are expecting your jgraph libraries to be uploaded to /jpgraph-2.3.4/src/ in the directory where you have the strikes.php files located and then the true type fonts are in /lightning/ also within the directory where strikes.php is located. They actually supply the .ttf file used in the zip file. Both of these can be changed if you want to.
    PHP Code:
    $jploc $WEBROOT "/jpgraph-2.3.4/src/";      // Where your jpgraph is installed

    DEFINE ("TTF_DIR"$WEBROOT "/lightning/" );  // Where truetype font file is located (ariali.ttf) 
    Uploading now (24MB at a crawl!) to /usr/local/php-5.2.13/lib/php. Really hate Cox.

    Anyway, you probably noticed the folder as jpgraph-3.0.7. As they suggested, I changed that to just jpgraph and will adjust the config.
    Quote Originally Posted by wildjokerdesign View Post
    They actually mention an NSGraph.txt file also in the config of the file but not sure where you get that. Maybe you already have that.
    I do.

    Thanks again.
    John

  10. #10
    Junior Member jgillett's Avatar
    Join Date
    Jan 2008
    Location
    Phoenix, AZ
    Posts
    6

    Default

    Quote Originally Posted by wildjokerdesign View Post
    BTW: You might want to change the name or remove the info.php file on your account now that you have the info and since you posted it publicly now.
    Already gone.
    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •