Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to check jpgraph installation on my website

Posted on 2004-10-04
9
Medium Priority
?
465 Views
Last Modified: 2012-08-13
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
Comment
Question by:aynsoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
9 Comments
 
LVL 12

Expert Comment

by:minichicken
ID: 12224312
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
 
LVL 27

Expert Comment

by:Diablo84
ID: 12231180
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
 

Author Comment

by:aynsoft
ID: 12232522
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:aynsoft
ID: 12232621
server is unix as i am using mysql. I don't know any other way to confirm about the server.
0
 
LVL 12

Expert Comment

by:minichicken
ID: 12235004
Maybe also try realpath("your_font_path); for your font path... to make it absolute rather than relative.
0
 

Author Comment

by:aynsoft
ID: 12256403
still its not working
any other suggestion
0
 
LVL 27

Accepted Solution

by:
Diablo84 earned 1400 total points
ID: 12265685
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

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question