Wow after breaking my head for around 4 hours I did find a way to display information on the Graph which BASE produces.
The problem which I am facing is exactly described here. http://seclists.org/snort/2011/q1/722 though the complete solution is not so here goes.
First we need to see what is the font which BASE is using. That can be done by grepping for graph_font_name.
root@Bodhidarmar:/home/bala# grep graph_font_name /var/www/base/base_conf.php
// $graph_font_name = "Verdana";
$graph_font_name = "DejaVuSans";
// $graph_font_name = "Image_Graph_Font";
Now that we found that BASE is going to user DejaVuSans fonts, we need to make sure that our system has that fonts. If you cannot see them then copy these fonts from someother system and paste them in here.
root@Bodhidarmar:/var/www/base# ll /usr/share/fonts/dejavu/
-rw-r--r-- 1 bala bala 524056 2012-01-27 03:20 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 bala bala 573136 2012-01-27 03:19 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 301928 2009-08-27 19:56 DejaVuSansMono-Bold.ttf
-rw-r--r-- 1 root root 321524 2009-08-27 19:56 DejaVuSansMono.ttf
-rw-r--r-- 1 bala bala 523804 2012-01-27 03:20 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 bala bala 622280 2012-01-27 03:19 DejaVuSans.ttf
-rw-r--r-- 1 root root 306532 2009-08-27 19:56 DejaVuSerif-Bold.ttf
-rw-r--r-- 1 root root 328908 2009-08-27 19:56 DejaVuSerif.ttf
root@Bodhidarmar:/var/www/base#
Now this is the part which made me run mad, this site came to my rescue https://help.ubuntu.com/community/PhpPear , I just need to have a soft link of the font being used inside the PHP directory.
root@Bodhidarmar:/usr/share/php/Image/Canvas# ln -s /usr/share/fonts/truetype/ttf-dejavu/ Fonts
root@Bodhidarmar:/usr/share/php/Image/Canvas# ll
-rw-r--r-- 1 root root 6604 2012-01-27 03:54 Color.php
lrwxrwxrwx 1 root root 37 2012-01-27 04:12 Fonts -> /usr/share/fonts/truetype/ttf-dejavu//
The problem which I am facing is exactly described here. http://seclists.org/snort/2011/q1/722 though the complete solution is not so here goes.
First we need to see what is the font which BASE is using. That can be done by grepping for graph_font_name.
// $graph_font_name = "Verdana";
$graph_font_name = "DejaVuSans";
// $graph_font_name = "Image_Graph_Font";
Now that we found that BASE is going to user DejaVuSans fonts, we need to make sure that our system has that fonts. If you cannot see them then copy these fonts from someother system and paste them in here.
root@Bodhidarmar:/var/www/base# ll /usr/share/fonts/dejavu/
-rw-r--r-- 1 bala bala 524056 2012-01-27 03:20 DejaVuSans-BoldOblique.ttf
-rw-r--r-- 1 bala bala 573136 2012-01-27 03:19 DejaVuSans-Bold.ttf
-rw-r--r-- 1 root root 301928 2009-08-27 19:56 DejaVuSansMono-Bold.ttf
-rw-r--r-- 1 root root 321524 2009-08-27 19:56 DejaVuSansMono.ttf
-rw-r--r-- 1 bala bala 523804 2012-01-27 03:20 DejaVuSans-Oblique.ttf
-rw-r--r-- 1 bala bala 622280 2012-01-27 03:19 DejaVuSans.ttf
-rw-r--r-- 1 root root 306532 2009-08-27 19:56 DejaVuSerif-Bold.ttf
-rw-r--r-- 1 root root 328908 2009-08-27 19:56 DejaVuSerif.ttf
root@Bodhidarmar:/var/www/base#
Now this is the part which made me run mad, this site came to my rescue https://help.ubuntu.com/community/PhpPear , I just need to have a soft link of the font being used inside the PHP directory.
root@Bodhidarmar:/usr/share/php/Image/Canvas# ln -s /usr/share/fonts/truetype/ttf-dejavu/ Fonts
root@Bodhidarmar:/usr/share/php/Image/Canvas# ll
-rw-r--r-- 1 root root 6604 2012-01-27 03:54 Color.php
lrwxrwxrwx 1 root root 37 2012-01-27 04:12 Fonts -> /usr/share/fonts/truetype/ttf-dejavu//
No comments:
Post a Comment