Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

how to check jpgraph installation on my website

I want to create graph using jpgraph. On my personal pc i configure apache, php, mysql, jpgraph, make changes to php.ini and can also view graph but problem is i have taken space for my website and i want to show graph on my website and i don't know how to check whether jpgraph support is already there or not (GD library support is available)

I upload some of jpgraph phps and jpgraph-config.inc and arialbd.ttf font and check trybar.php (which creates bar graph working perfectly on my personal pc) it shows me an error
"./fonts/arialbd.ttf is readable or not available" I also set
DEFINE("TTF_DIR","./fonts/");     in jpgraph-config.inc

Can anyone tell me what is the problem.
0
aynsoft
Asked:
aynsoft
  • 3
  • 2
  • 2
1 Solution
 
minichickenCommented:
Hi aynsoft

You cannot open the font to create your image? Is your font path correct? And what OS are you running? Does that JPGRAPH need GD2?
First try this to see if you got FreeType support (for fonts) installed on the server. To check if you got FreeType support use something like this:

<?
$info = gd_info();
$values = array_values($info);
$keys = array_keys($info);

$count = count($info);
$i = 0;

while ($i < $count)
{
      echo "<b>".$keys[$i]."</b>";
      echo "<br>";
      echo $values[$i];
      echo "<br><br>";
      ++$i;
}
?>

Let me know...
0
 
Diablo84Commented:
Is the directory path correct?

./fonts/ is from the current directory

ie. the folder called fonts that resides in the same directory as jpgraph.php

Prehaps it should be /fonts/

ie. from the root of your site instead
0
 
aynsoftAuthor Commented:
Hi,

I execute the above script.I think it provides free font support as it shows me following output :

GD Version
bundled (2.0.23 compatible)

FreeType Support
1

FreeType Linkage
with freetype

T1Lib Support


GIF Read Support
1

GIF Create Support


JPG Support
1

PNG Support
1

WBMP Support
1

XBM Support
1

JIS-mapped Japanese Font Support

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
aynsoftAuthor Commented:
server is unix as i am using mysql. I don't know any other way to confirm about the server.
0
 
minichickenCommented:
Maybe also try realpath("your_font_path); for your font path... to make it absolute rather than relative.
0
 
aynsoftAuthor Commented:
still its not working
any other suggestion
0
 
Diablo84Commented:
Last idea is to try

DEFINE("TTF_DIR",$_SERVER['DOCUMENT_ROOT']."/fonts/");

ensuring that the "/fonts/" part is the path to your fonts folder from the root
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now