Mantis Logo
Mantis Manual
Manual
Configuration

Database
Path
Webserver
Version
Email
Language
Display
Time
JpGraph
Date
News
Default Preferences
Summary
Bugnote
File Upload
HTML
Authentication
Status Settings
Filters
Misc
Colors
Cookies
Database Tables
Speed Optimisation
Reminders
Bug History
Sponsorship
Source Control Integration
Custom Fields
My View Settings
Relationships
System Logging


Partner Links


JpGraph
Last Modified: August 3, 2003 08:08AM
(Any)
Description

Jpgraph is a package that is used to render graphs. It is used by Mantis to provide the users with graphs that capture the state of the bugs database. Following are the configuration options that are related to configuring it:

$g_use_jpgraph Enable the use of jpgraph. Default is OFF.
$g_jpgraph_path Path to jpgraph base directory. Don't forget to add the trailing '/'.
To use the Jpgraph addon you need the JpGraph package. You can place the package whereever you want, but you have to set the var in jpgraph.php

 eg. DEFINE("DIR_BASE","/www/mantisbt/jpgraph/"); 

User Contributed Notes
JpGraph
Add Notes About Notes
fsebbah@gnuline.com
06-Jan-2004 15:11
#48
Hello
I am not sure to undersdand your concept with jpgraph
In my config_inc.php, I have this:

$g_use_jpgraph = ON;
$g_jpgraph_path ='/var/www/toto.net/jpgraph/src/';

But it's not good??
Thanks
Franck
lhauserm@naema.org
20-Jan-2004 9:54
#54
It seems that the DIR_BASE is not present in latest stable release of the jpgraph package.
I could not get mantisbt running with 1.14...

Regards,
robert@toequest.com
21-Jan-2004 22:58
#55
I couldn't find DIR_BASE in jpgraph 1.13 or 1.12.2. I'd really like to get jpgraph working with mantis. I've seen sites that have done this. Could anyone provide step-by-step instructions on what to do? I just don't get it.

Thanks,
--Robert
bogdan@itcnet.ro
22-Jan-2004 6:40
#56
Jpgraph 1.14 and mantis
Let's say you installed jpgraph in /www/html/jpgraph. So in this directory you have the file jpgraph.php. Verify this and there is no need to change this file.

In config_inc.php add/modify these lines:
$g_use_jpgraph = ON;
$g_jpgraph_path = '/var/www/html/mantis/jpgraph/'; #if you are on unix

or

$g_jpgraph_path = DIRECTORY_SEPARATOR . 'www' . DIRECTORY_SEPARATOR . 'html' . DIRECTORY_SEPARATOR . 'jpgraph' . DIRECTORY_SEPARATOR; # for a platform independent configuration

Take care that the latest jpgraph archive has the actual php files in jpgraph-x-x-x/src directory. So move the src directory as /www/html/jpgraph.

Works for me in this setup.
Great job Mantis group )

Bogdan
ance_x@msn.com
28-Jan-2004 22:34
#64
i'm running mantis on windows OS, is there anybody know how to config mantis with jpgraph in Windows?thanx!
help@full.com
11-Feb-2004 10:23
#68
System
win2k, apache, mysql, php

Install
Localhost
so to access mantis I will enter http://localhost/mantis/

web path d:\web\site
mantis path d:\web\site\mantis
jpgraph path d:\web\site\matnis\jpgraph\src\

In the file config_defaults_inc.php (in the mantis folder)
change the lines

$g_use_jpgraph = ON;
$g_jpgraph_path = '../mantis/jpgraph/src/';

and now it should work
--
cheers
BDR

egavaldo@salemioche.com
23-Feb-2004 4:13
#72
Hi there,
So I've installed the latest version of JPGraph (1.14) this way:

"C:\mantis\jpgraph\src"

"C:\mantis" being the installation directory of mantis on my WinXP platform...

I tried these settings in my config_inc.php:

$g_use_jpgraph = ON;
$g_jpgraph_path = '/mantis/jpgraph/src/';

and

$g_use_jpgraph = ON;
$g_jpgraph_path = '../mantis/jpgraph/src/';

... but the graph are not displayed on the report page :((
Any ideas folks ?
Thx in advance.
Eg\\*

egavaldo@salemioche.com
23-Feb-2004 4:46
#73
additional info: error returned is:

Fatal error: Call to undefined function: imagecreatefromstring() in C:\mantis\jpgraph\src\jpgraph.php on line 5650
pieter AT internethoofdkantoor DOT nl
29-Feb-2004 6:53
#77
The problem described above seems to come from an error in JpGraph gd checking. The imagecreatetruecolor function is only available in gd2. Editting jpgraph.php and changing 'auto' on the line that says 'USE_LIBRARY_GD2' to false did the trick for me.
francisco.mancardi@gruppotesi.com
15-Mar-2004 2:26
#85
Windows 2000, IIS, PHP, Mysql

Mantis directory : c:\inetpub\wwwroot\mantis-0.18.2
Jpgraph directory: c:\inetpub\wwwroot\mantis-0.18.2\jpgraph-1.14

in config.php

  $g_use_jpgraph = ON;
  $g_jpgraph_path ='./jpgraph-1.14/src/';

it works !!!
pstephan AT applied1 DOT com
19-Mar-2004 10:39
#91
Even with the above help I'm not able to get JpGraph working. Here's my configuration:

   Mantis: 0.18.2 (installed in c:\stuff\Mantis)
   JpGraph: 1.14 (installed in c:\stuff\Mantis\JpGraph)
   php: 4.3.4
   MySQL: 4.0.18
   O/S: Windows Server 2003 with IIS

In IIS I have a virtual directory setup under my default web site that points to c:\stuff\Mantis so that I can get to Mantis via http://localhost/Mantis.

I have added these entries to config-inc.php:
   $g_use_jpgraph = ON;
   $g_jpgraph_path = './Mantis/jpgraph/src/';

I have tried variations on the path including './jpgraph/src/'.

The only thing I see on the various Summary pages is the small box with a red x where the image should be.

Any suggestions?
alien@gugga.net
09-Apr-2004 6:36
#104
make sure that GD library is enabled in PHP ini file.

extension=php_gd.dll
or
extension=php_gd2.dll
wmitchell@hotmail.com
04-May-2004 11:21
#129
Be careful when your uploading jp_graph to your server .. I found I had it installed under ../jpgraph-1.14/jpgraph-1.14/src/ which threw me for a minute
king@king.com
09-Jun-2004 1:09
#150
you must change the TTF_DIR value of jpgraph
it is in the xxx_configxxxx file
krishna.devan@iqss.co.in
06-Jul-2004 4:14
#165
Hi all,
  I am having problem with Gantt Chart (no Graph is displayed) in Windows 2003 server. My PHP Version is 4.3.7.
  I tested my application in windows 2000 and PHP4.3.4. Gantt Chart is working fine.
  Is there any difference in the settings (configuration) while we run in Windows 2003 and PHP4.3.7?
  Only difFerence i see in both these installations is that in Windows 2003 i have used CGI(PHP.EXE) while in Windows 2000 it

is ISAPI(PHP4ISAPI.DLL). When we tried to install ISAPI in Windows 2003 PHP scripts does not execute.


  Any ideas?

Thanks in advance.
Regards

 krishna devan
kbhatti@convergence.com.pk
13-Jul-2004 7:12
#170
$g_use_jpgraph = ON;
$g_jpgraph_path = '/home/httpd/htdocs/mantis/jpgraph/src/';

I have this configuration in
config_defaults_inc.php, config_inc.php
but still graphs are not visible?



djockheck@gauselmann.de
17-Aug-2004 5:19
#185
Hi there!

After Updating from mantis 0.18.3 to 0.19.0a2 jpgraph doesn't work anymore. There are only empty boxes instead of graphs.

My config_inc.php contains:
<cut>
        $g_use_jpgraph = ON;
        $g_jpgraph_path = '/srv/www/htdocs/jpgraph/src/';
</cut>
I'm using jpgraph 1.14

Any Ideas? Are there any logfiles that may explain the problem?

ciao
Detlef
theblacklion_at_web_dot_de
21-Aug-2004 7:11
#190
after installing mantis 0.19.0a2 i also couldn't see any graphs. after looking into my logfiles, i've found a message about exhausted memory within php. in my php.ini file i've increased the max memory size from 8 to 16mb and it works...
email_khairi83@NOSPAMyahoo.com
08-Sep-2004 19:27
#199
My graph can display if i run on win 98 (use apache 1.3.3) but it not appear went i run in intranet (microsoft IIS 5.0).
elifarley_NOSPAM@NOSPAM_PLEASE
24-Sep-2004 10:00
#210
Some screenshots may help us see if our setup is working properly.
In my case, when I click the little icons, a new page loads but no graphs are shown.
tonioli@k2sistemas.com.br
29-Sep-2004 16:13
#214
Dont forget to edit your php.ini and set memory_limit = 16M, the default 8M could not be used, i mean, will not work if you use it :)

and dont forget to :

$g_use_jpgraph = ON;
$g_jpgraph_path = '/var/www/html/mantis/jpgraph/src/';


you must especify the src dir ...

Felipe Tonioli
canelli.nospan@nospam.email.com
11-Oct-2004 6:28
#227
I'm installed mantis 0.19.0 and jpgraph 1.17 on a Win 2000 box and all work fine with PHP 4.3.4 and IIS.
in php.ini I load php_gd2.dll extension

Mantis installed into : C:\tools\mantis
Jpgraph installed into: c:\tools\jpgraph

in mantis config_inc.php I set

$g_use_jpgraph = ON;
$g_jpgraph_path = 'C:' . DIRECTORY_SEPARATOR . 'tools' . DIRECTORY_SEPARATOR . 'jpgraph' . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR ;
TomR@proguide.nl
18-Oct-2004 7:00
#236
If you get no pictures at all, only a red cross in a in image placeholder please check your config and custom files.

If you have trailing spaces or blank lines after the ?> php-end-marker your graphs will not show up.
nospamplease@none.com
27-Oct-2004 12:46
#249
Solution: How to get JPGraph 1.14 and higher to work with your Hosting firm, at least mine ;), www.powweb.com.

INFO about my configuration.
Mantis directory on server if FTP'ed to it:

"/htdocs/intranet/webapps/mantis/"

JPGraph directory on server if FTP'ed to it:

"/htdocs/common/jpgraph/"

I un'zipped,untarred and put the .php files in the main folder.

Now open the file "config_inc.php" for editing (ignore the : # (DEFINE('DIR_BASE'... etc. remarks if they are there.),

ADD I added these lines below:

$g_use_jpgraph = ON;
$g_jpgraph_path = '../../../common/jpgraph/';

Do NOT forget the ending slash!

"../" means one directory up, so 3x "../" is the root and then down to
"/common/jpgraph/" to go again.

So simple, yet it took me quite long to get it right 8-D

I did NOTHING else than this, no memory adjust, no PHP.ini adjust etc.
I think this solution will work with most Linux or Unix based hosters.

Enzo
teckyan888@yahoo.com
03-Nov-2004 9:55
#254
How come i already follow the step that mentioned above,but it show the error :
JpGraph Error: No path specified for CACHE_DIR. Please specify a path for that DEFINE in jpgraph.php

If i put my
mandin in :C:\Program Files\Apache Group\Apache2\htdocs\mantis
jpgraph in :C:\Program Files\Apache Group\Apache2\htdocs\mantis\jpgraph

then,what should i put in CACHE_DIR???

Inside the mandin file, it got config_defaults_inc and config_inc.php.sample...Which one should i correct???Can show me the step??
Thanks....
smileliyan@eyou.com
10-Jan-2005 3:06
#313
I have resolved the JPgragh setting,just do it
open the file "config_inc.php" ,and added these lines below:

$g_use_jpgraph = ON;
$g_jpgraph_path = './jpgraph/src/';
I put the JPgragh folder in the root directory "Mantis",make sure your $g_jpgraph_path,it's important,I was failed in setup at the very start.it took me much time to fine that the primary problem is the wrong path.

and now,I have another problem,how can I make legend and the coordinate show in chinese?
didier.kuttel@matisa.ch
13-Jan-2005 4:50
#317
Hi,

I've done as you said :

$g_use_jpgraph = ON;
$g_jpgraph_path = './jpgraph/';

I've put the source files directly in jpgarph, no src folder.

In summary, no image are displayed ...

Mantis 0.19.2

As far as I know, my hoster limit the memory to 10 MB. When running the samples in jpgraph distribution, they run without problems.

Any suggestion ?

Thanks
sumit@problem
17-Feb-2005 8:57
#357
i am getting error of GD lib not configure .. how can i do that

thanks for help
Sumit
dontlikespam@nospam.com
18-Feb-2005 18:54
#360
I use mantis 0.19.2 and jpgraph 1.17 with xampp 1.4.11 on a win2003 box.
In mantis no graphs are shown, just an empty box (no red cross) but running jpgraph testsuit.php shows all graphs.
config_inc.php has defined:
$g_use_jpgraph = ON;
$g_jpgraph_path = '.' . DIRECTORY_SEPARATOR . 'jpgraph' . DIRECTORY_SEPARATOR;

any idea how I can get jpgraph running ok?

BTW: apache2 has only https support, no http but I don't think that this can cause the problem.

TIA
configure@ttfdir.var
23-Feb-2005 7:43
#362
i'm using win2k3, iis6, mysql,php


i have problems with testsuit.php. how do you set your ttf_dir variable?

i've tried everything

thanx
qbaas01@wp.pl
24-May-2005 5:16
#441
I had a working version of mantis 0.19.2 with a working jpgraph on the summary page.

After making an upgrade to 10.0.a2 jpgrapgh stopped working.
I can only see red crosses instead of pictures.
I changed nothing excapt upgrade mantis.
There has to be some issue in mantis that prevents the pictures from beeing generated:
I checked the memory limit in php.ini, set it to 128MB
Checked the trailing sjlashes, support for gd2 in php.ini, everything which was suggested here
testsuit.php runs all fine!
I strongly belive its mantis that has an issue with this

Pleas prvide me some suggestions how to fix this.
thank you
Kuba
qbaas01[at]wp.pl
24-May-2005 5:45
#442
I found the root cause of my problems with jpgraph.

One time in order to add a field to
View Issues
I had to set output_buffering to On in php.ini in order not to get a blank page while trying to get to mantis login page and not to get errors about header already passed sth..

But with this set to On the jpgraph is not working

While setting this to off and removing a prevoiusly created file:
custom_functions_inc.php

I was able to have a working version of jpgrapgh again.

This is a bug in Mantis then.
The way mantis handles jpgrapgh when buffering set is on must be wrong.

regards,
Kuba
nospam@sorry.be
25-Jun-2005 3:57
#488
For those who would be scared by all these notes.
I use linux and mantis 1.0.03a and just added
$g_use_jpgraph = ON;
$g_jpgraph_path = '/opt/www/myname/lib/jpgraph/src/';
to config_inc.php and it works.
jimmy@gd.com
22-Jul-2005 12:57
#533
on gentoo 2005:

unmask jpgraph in /etc/portage/package.keywords

   dev-php/jpgraph ~x86

emerge jpgraph -av
add to config.inc.php

$g_use_jpgraph = ON;
$g_jpgraph_path = '/usr/lib/php/jpgraph/';
Test@test.com
18-Aug-2005 23:52
#574
there's a error while running 'graph->img->SetAntiAliasing()'
i comment that lines and solved the problem.
djionel82@yahoo.com
09-Sep-2005 7:06
#598
Hi!
I am using jpgraph JpGraph 1.19 and PHP 4.3.10-15.
I have written a script that generates over 5000 graphs. There are only 2D graphs, simple lineplots.
Unfortunately the script always exhausts all the available memory.
My php memory limit is 100MB and is not sufficient!
The number of graphs to plt increases every day it will soon reach 10000.
How much memory do I need in order to create all my graphs????
I don't feel confortable not even using 100MB, not even 64MB. What is using all the memory??
I have checkd my script with Zend editor and jpgraph.php consumes over 70% of the script's memory usage.
Is there a solution to free the memory used by jpgraph.php???
Or should I generate the graphs 1000 at a time ....
hmmm
geowizzNoSpam@nospam.com
21-Sep-2005 7:15
#620
auto detect of GD2 by jpgraph doesn't work on my server.
symptom : no graphic
in this case

DEFINE("USE_LIBRARY_GD2",false);

in jpconfig.inc solves the problem.
bkeating@gmail.com
29-Nov-2005 21:39
#738
Yea, 8mb memory limit seems to cause some problems. I changed the following in my php.ini file and my graphs started working:

this:
memory_limit = 8M
to
memory_limit = 16M
a.premkumar _ AT _ gmail _ DOT _ com
09-Dec-2005 12:11
#758
Specs:
------
Mantis 1.0.0rc3
JpGraph 2.0
PHP 5.1.1
Apache 2.0.54
Windows XP SP2
=======================================================

Problem:
--------
Only error image comes with the message:
     "General PHP error: var: Deprecated. Please use the public/private/protected modifiers"
=======================================================

Solution:
---------
CATCH_PHPERRMSG should be set false in jpg-config.inc of JpGraph

      DEFINE("CATCH_PHPERRMSG",false);
=======================================================

Enjoy!
~prem
sanjose95148@hotmail.com
19-Jan-2006 1:28
#832
Don't forget to restart your http server after you make the modifications.
antoine.troul@laposte.net
30-Jan-2006 5:04
#850
like some others I just see empty boxes (red cross) in graphics.
my directories are like this :
/home/_services_/httpd/mantis.rv.fr/ for Mantis
/home/_services_/httpd/mantis.rv.fr/jpgraph for Jpgraph

The file config_inc.php is OK
I got enought memory in php.ini

If I give the path of an existing image, for example :
/home/_services_/httpd/mantis.rv.fr/images/wordicon.gif

So, if someone can bring me an explaination and a solution ...
Thank's

Antoine
antoine.troul@laposte.net
30-Jan-2006 5:18
#851
Oups, I forgot the end of this :
If I give the path of an existing image, for example :
/home/_services_/httpd/mantis.rv.fr/images/wordicon.gif

--> it works

But if I let the default paths in "summary_graph_imp_priority.php":
(...)
<tr valign="top">
        <td width="50%">
                <img src="/summary_graph_bypriority.php" border="0" align="center" />
         </td>
</tr>
(...)

--> still the symbol of "image missing"
antoine.troul@laposte.net
30-Jan-2006 9:35
#852
I found a solution (THE solution ?) :
I updated my PHP release, from v4 to v5 and now it's OK.

So, with Mantis 0.19.4, you need PHP 5.

Antoine
EBY
22-Feb-2006 20:20
#902
With Linux... Just make sure php_gd package is installed and that you added the gd.o extension to you php.ini. My distribution did not install this package by default.
topodoco at yahoo dot fr
28-Apr-2006 9:09
#1033
In my case (Windows XP, easyPHP)
it was just a problem of interpretation of the config file.
Indeed, I put TRUE instead of 'ON' for $g_use_jpgraph, and it works
I also put the jpgraph directory in mantis directory and have the following var : $g_jpgraph_path ='./jpgraph/src/';

There is also other options which are affected by this "bug"
agrj@aes.com.br
14-Jul-2006 9:17
#1193
I could fix the problem with red X, changing the config_inc.php setting for fonts to none like below

$g_graph_font = '';
kalpana.kalidass@gmail.com
09-Aug-2006 5:42
#1218
Hi all,

I have installed JGraph pacakage in my system. Its working well. Nothing else to configure specially for JGraph

Just uncomment the

extension=php_gd2.dll

in the php.ini

Thats all! Put your JGraph package in the localhost. Now u can run ur program

If u want to run your program in a different directory means just copy the /src folder from JGraph package and put it in your own directory.
Thats all.......

Regards,
Kalpana
r.healy@pilz.ie
09-Aug-2006 7:48
#1221
I've encountered the following error when attempting to load the various graphs

Fatal error: Failed opening required '/mantis/jpgraph-1.20.4/src/jpgraph.php' (include_path='.;c:\php4\pear') in c:\program files\phpdevserver\html\mantis\core\graph_api.php on line 15

Has anyone encountered similar problems
allen.yeh@moxanet.com
17-Aug-2006 21:36
#1239
Hi,
   All graph display well, but how can I to configure and display utf-8 correctly?
   The request come from user in Taiwan.
setup@gemtek.com.tw
30-Oct-2006 1:54
#1281
[Environment]
 OS : Fedora Core 5
 Apache : 2.2.0
 mysql : 5.0.22
 php : 5.1.6
 mantis : 1.0.5
 jpgraph: 2.1.3

[phpinfo]
                  gd
GD Support enabled
GD Version bundled (2.0.28 compatiable)
FreeType Support enabled
FreeType Language with freetype
FreeType Version 2.1.10
...
(ps. /usr/lib/php/modules/gd.so)

[config_inc.php]
...
#---jpgraphic -----
$g_use_jpgraph = ON;
$g_jpgraph_path = 'jpgraph-2.1.3/src/';
...
(ps. mantis directory : /var/www/html/mantis_1.0.5
     jpgraph directory: /var/www/html/mantis_1.0.5/jpgraph-2.1.3)

I have a problem about graph function.
"Synthesis" in the Summary was OK, but graph pages were always empty without any error.

I tried following methods ... , but still couldn't solve it.
(1)change attributes
chmod 777 -R mantis_1.0.5
chown -c -R 501 * mantis_1.0.5
chgrp -c -R 501 * mantis_1.0.5

(2)change memory_limit in the php.ini
memory_limit = 8M
to
memory_limit = 16M
setup@gemtek.com.tw
30-Oct-2006 2:35
#1282
Oh! I saw the graphs after restarted the httpd.
Maybe the memory is the key point.
Thanks everybody ...
Add Notes About Notes
Last updated: Wed, 20 Aug 2008 - 5:42:19

Mantis @ SourceForge