title: PHP JpGraph: The image cannot be displayed because it contains errors
body: <p>When I run the file in php file in Firefox 35, it returns the Image cannot be displayed because it contains errors.</p>
  
  <p>apache v2.4.7
  php v5.5.9 GD include</p>
  
  <pre><code>&lt;?php
             require_once("/jpgraph-3.5.0b1/src/jpgraph.php");
             require_once("/jpgraph-3.5.0b1/src/jpgraph_line.php");
             require_once("/jpgraph-3.5.0b1/src/jpgraph_date.php");
             require_once("/jpgraph-3.5.0b1/src/jpgraph_bar.php");
             DEFINE('NDATAPOINTS',1440);
             DEFINE('SAMPLERATE',1440);
             $graph = new Graph(650,200);
             $graph-&gt;SetScale("textlin");
             $graph-&gt;SetShadow();
             $graph-&gt;AddText($txt2);
             $graph -&gt;title-&gt;SetFont(FF_ARIAL,FS_BOLD,8);
             $graph-&gt;SetMargin(60,50,10,35);
             $graph-&gt;SetScale('datlin');
             $graph-&gt;title-&gt;Set("$date");
             $graph-&gt;xaxis-&gt;SetLabelAngle(0);
             $graph-&gt;SetImgFormat('jpeg',100);
             $graph-&gt;SetBackgroundImage("cpu.jpg",BGIMG_FILLFRAME);
             $graph-&gt;SetTickDensity(TICKD_NORMAL,TICKD_SPARSE);
             $graph-&gt;xaxis-&gt;scale-&gt;SetDateFormat('h:i');
             $graph-&gt;xaxis-&gt;scale-&gt;SetTimeAlign(MINADJ_1);
             $line = new LinePlot($data,$xdata);
             $line-&gt;SetLegend('CPU');
             $graph-&gt;yaxis-&gt;HideZeroLabel();
             $graph-&gt;xgrid-&gt;Show(true,false);
             $graph-&gt;xgrid-&gt;SetColor('black@0.8');
             $line-&gt;SetFillColor('chartreuse2@0.6');
             $line-&gt;SetFillColor('lime@0.4');
             $graph-&gt;Add($line);
  ?&gt;
  </code></pre>