I had the same problem and found the solution after just an hour or so.
The issue is that jpgraph loads a default set of font files each time a Graph is created. I couldn't find a way to unload a font, so I made a slight change so that it only loads the fonts one time.
To make the fix for your installation, edit "gd_image.inc.php" as follows:
Add the following somewhere near the beginning of the file (just before the CLASS Image):
// load fonts only once, and define a constant for them
define("GD_FF_FONT0", imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT0.gdf"));
define("GD_FF_FONT1", imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1.gdf"));
define("GD_FF_FONT2", imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2.gdf"));
define("GD_FF_FONT1_BOLD", imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1-Bold.gdf"));
define("GD_FF_FONT2_BOLD", imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2-Bold.gdf"));
then at the end of the Image class constructor (lines 91-95), replace this:
$this->ff_font0 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT0.gdf");
$this->ff_font1 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1.gdf");
$this->ff_font2 = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2.gdf");
$this->ff_font1_bold = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT1-Bold.gdf");
$this->ff_font2_bold = imageloadfont(dirname(__FILE__) . "/fonts/FF_FONT2-Bold.gdf");
with this:
$this->ff_font0 = GD_FF_FONT0;
$this->ff_font1 = GD_FF_FONT1;
$this->ff_font2 = GD_FF_FONT2;
$this->ff_font1_bold = GD_FF_FONT1_BOLD;
$this->ff_font2_bold = GD_FF_FONT2_BOLD;
I didn't test this with multiple versions of php or jpgraph, but it should work fine. ymmv.