Default Mantis Graph (bundled) not displaying

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

JdGraph Pie Charts
JdGraph Pie Charts
JdGraph.png (13.55 KiB) Viewed 19183 times
OS: Debian 6.0.5 Squeeze
PHP: PHP Version 5.2.5
DB: MySQL
Mantis: 1.2.12
Apache: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8g DAV/2 PHP/5.2.5

I have done research on this issue before posting here btw...

Hi Guys. I had a test Mantis VM system setup recently and I was checking out the Mantis Graphs plugin. They worked fine and the graphs were yellow BAR graphs. I had the Mantis Graphics plugin configured to use the Bundled graphs. I did run into the 'unable to find font' issue but once I installed ttf-mscorefonts the error went away.

So, we had an issue with our Xenserver and I had to rebulid the test Mantis VM. Once I had everything setup again I went to view the graphs and ran into the same error as before "unable to find font". I had a harder time then expected trying to get apt-get to find and install ttf-mscorefonts-installer but eventually edited my /etc/apt/sources file and was able to download it. I refreshed my page and the error went away but now NOTHING is showing.

See the screenshots provided.

I am able to get JpGraph working fine, but I did notice that the graphs are now PIE charts instead of BAR graphs. Perhaps I don't have my config_inc.php file configured correctly or perhaps thats just how JpGraphs displays, using pie charts vs bar graphs.

Just wondering if anyone has experienced this issue before.

Thanks for your time

cheers
Attachments
Mantis default "Bundled" configuration - No graphs displaying
Mantis default "Bundled" configuration - No graphs displaying
bundled.png (26.81 KiB) Viewed 19183 times
atrol
Site Admin
Posts: 8544
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Default Mantis Graph (bundled) not displaying

Post by atrol »

I tried "per severity" using JpGraph and bundled library without any problem.
I get 3 graphs:
1. By severity bar chart
2. By severity percentage pie chart
3. By severity and statis bar chart

Check your webserver error log.

Is there any reason to use a quite outdated PHP version?
Please use Search before posting and read the Manual
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Re: Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

Hi Atrol,

We are using an out of date php version just for compatibility sake. We wanted to build the exact system as our production system and wanted to make sure that everything worked without a hitch so basically the specs I listed above are the exact same as our production system.

the 'bundled' option does not work, but the JpGraph option does.

I checked apaches error_log and access_log and saw these entries when I set the graph option to "Bundled" / all projects / per severity
When I view the page in IE I get the little box with a red X inside it indicating that an image did not show but when viewing with Firefox I don't see anything.

[Tue Aug 21 10:25:38 2012] [notice] child pid 25411 exit signal Segmentation fault (11)
[Tue Aug 21 10:25:42 2012] [notice] child pid 24670 exit signal Segmentation fault (11)
[Tue Aug 21 10:25:45 2012] [notice] child pid 24855 exit signal Segmentation fault (11)
[Tue Aug 21 10:25:48 2012] [notice] child pid 24943 exit signal Segmentation fault (11)

Looks like some apache processes are crashing when trying to display using the default Bundled graphs. This is probably due to my out of date version of PHP? I may try disabling modules one at a time in php.ini and possibly using a debugger like gdb and attach to a child process to see if I can figure out why the apache child processes are crashing.
atrol
Site Admin
Posts: 8544
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Default Mantis Graph (bundled) not displaying

Post by atrol »

newmantisuser wrote: When I view the page in IE I get the little box with a red X inside it indicating that an image did not show
Right click on the X and select "Open in new tab" (or something similiar)
Do you get any readable error message in the new tab?
newmantisuser wrote:This is probably due to my out of date version of PHP?
Who knows, without trying I say 97% ;-)
Please use Search before posting and read the Manual
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Re: Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

Hi Atrol,

Thanks for the reply. When I right click on the red x (in IE only) the option to open in new tab is greyed out.

When I try to execute the script directly in the browser I get the following error

Fatal error: Call to undefined method RotImage::SetAntiAliasing() in /opt/ktdms/knowledgeTree/mantisbt-1.2.11/library/jpgraph/themes/UniversalTheme.class.php on line 85

Now this is expected because I had to edit a jpgraph configuration file jpgraph/gd_image_inc.php and comment out the entire 'anti-aliasing' section in order for JpGraph to display anything at all.

Comment out the whole anti-aliasing function

// Should we use anti-aliasing. Note: This really slows down graphics!
// function SetAntiAliasing($aFlg=true) {
// $this->use_anti_aliasing = $aFlg;
// if( function_exists('imageantialias') ) {
// imageantialias($this->img,$aFlg);
// }
// else {
// JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installation$
// }
// }

See the attached file for the error I used to get with JpGraph before commenting out the anti-alias function above

This was not a big deal as I just commented out that function and the graphs displayed fine (pie charts). The real issue is why the Bundled Graphics are not displaying graphs (bar graphs)
Attachments
Untitled.png
Untitled.png (3.79 KiB) Viewed 19137 times
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Re: Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

I wonder if I installed php5-gd would that fix the issue.


GD module for php5

This package provides a module for handling graphics directly from PHP scripts. It supports the PNG, JPEG, XPM formats as well as Freetype/ttf fonts.

PHP5 is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. The goal of the language is to allow web developers to write dynamically generated pages quickly. This version of PHP5 was built with the Suhosin patch.

i'll give that a try I think...will keep you posted.

(edit - that did not work lol) apache processes keep crashing when trying to display the charts using the bundled graphics library.
opulentuz
Posts: 9
Joined: 28 Sep 2012, 06:26

Re: Default Mantis Graph (bundled) not displaying

Post by opulentuz »

Can you please help me to see graphs in mantis with step by step..
I am not able to see graphs according to category,actually in my system not showing any reports option
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Re: Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

what system are you running
what sql db
what linux os

what if any error do you get? Does anything display on the graphs page?

what type of graph are you trying to view? Default or JPGraph?

check the apache error logs for more details. I found out that when I tried to view graphs certain processes crashed.

We reformatted and moved to a VM and everything has worked fine since.
newmantisuser
Posts: 68
Joined: 06 Aug 2012, 18:13

Re: Default Mantis Graph (bundled) not displaying

Post by newmantisuser »

In order for me to get the Graphs working on a fresh install of Debian 6 64-Bit I did the following.

This is for JPGraph graphs (not the default)

1. made sure that the ttf-mscorefonts was installed
apt-get ttf-mscorefonts-installer

2. Downloaded JPGraph from http://jpgraph.net/download/
comment out jpgraph/gd_image_inc.php section regarding anti-aliasing

// Should we use anti-aliasing. Note: This really slows down graphics!
// function SetAntiAliasing($aFlg=true) {
// $this->use_anti_aliasing = $aFlg;
// if( function_exists('imageantialias') ) {
// imageantialias($this->img,$aFlg);
// }
// else {
// JpGraphError::RaiseL(25128);//('The function imageantialias() is not available in your PHP installati$
// }
// }

3. I had to install libphp-jpgraph
apt-get install libphp-jpgraph

To get the default graphs working (Bundled, GD Library) I did the following

1. add php-gd support and then restart apache
apt-get install php5-gd ; /etc/init.d/apache2 restart

you then get the following error when trying to view graphs
'unable to read / find font'

you then need to install ttf-mscorefonts-installer. I grabbed the .deb file from here since apt-get was not obtaining and installing it for me
http://ftp.us.debian.org/debian/pool/co ... .3_all.deb

2. install the .deb package
dpkg -i ttf-mscorefonts-installer_3.3_all.deb and it worked.

good luck sir
Post Reply