J'aimerai installer un graphique JpGraph sur mon site, sauf que j'ai ce message d'erreur :
Strict Standards: Declaration of GraphTabTitle::SetPos() should be compatible with Text::SetPos($aXAbsPos = 0, $aYAbsPos = 0, $aHAlign = 'left', $aVAlign = 'top') in /data/web/virtuals/287896/virtual/www/jpgraph-1.22.1/src/jpgraph.php on line 3165
Strict Standards: Declaration of GraphTabTitle::Stroke() should be compatible with Text::Stroke(&$aImg, $x = NULL, $y = NULL) in /data/web/virtuals/287896/virtual/www/jpgraph-1.22.1/src/jpgraph.php on line 3165
Strict Standards: Declaration of RotImage::FilledArc() should be compatible with Image::FilledArc($xc, $yc, $w, $h, $s, $e, $style = '') in /data/web/virtuals/287896/virtual/www/jpgraph-1.22.1/src/gd_image.inc.php on line 2154
JpGraph Error: HTTP headers have already been sent.
Caused by output from file jpgraph.php at line 3165.
Il est déjà sur un autre site, sous un autre hébergeur avec exactement les mêmes éléments et cela fonctionne bien.
Ce qui correspond à la ligne 2154 c'est ça :
class RotImage extends Image {
var $m=array();
var $a=0;
var $dx=0,$dy=0,$transx=0,$transy=0;
function RotImage($aWidth,$aHeight,$a=0,$aFormat=DEFAULT_GFORMAT,$aSetAutoMargin=true) {
$this->Image($aWidth,$aHeight,$aFormat,$aSetAutoMargin);
$this->dx=$this->left_margin+$this->plotwidth/2;
$this->dy=$this->top_margin+$this->plotheight/2;
$this->SetAngle($a);
}
function SetCenter($dx,$dy) {
$old_dx = $this->dx;
$old_dy = $this->dy;
$this->dx=$dx;
$this->dy=$dy;
$this->SetAngle($this->a);
return array($old_dx,$old_dy);
}
function SetTranslation($dx,$dy) {
$old = array($this->transx,$this->transy);
$this->transx = $dx;
$this->transy = $dy;
return $old;
}
function UpdateRotMatrice() {
$a = $this->a;
$a *= M_PI/180;
$sa=sin($a); $ca=cos($a);
// Create the rotation matrix
$this->m[0][0] = $ca;
$this->m[0][1] = -$sa;
$this->m[0][2] = $this->dx*(1-$ca) + $sa*$this->dy ;
$this->m[1][0] = $sa;
$this->m[1][1] = $ca;
$this->m[1][2] = $this->dy*(1-$ca) - $sa*$this->dx ;
}
function SetAngle($a) {
$tmp = $this->a;
$this->a = $a;
$this->UpdateRotMatrice();
return $tmp;
}
function Circle($xc,$yc,$r) {
// Circle get's rotated through the Arc() call
// made in the parent class
parent::Circle($xc,$yc,$r);
}
function FilledCircle($xc,$yc,$r) {
list($xc,$yc) = $this->Rotate($xc,$yc);
parent::FilledCircle($xc,$yc,$r);
}
function Arc($xc,$yc,$w,$h,$s,$e) {
list($xc,$yc) = $this->Rotate($xc,$yc);
$s += $this->a;
$e += $this->a;
parent::Arc($xc,$yc,$w,$h,$s,$e);
}
function FilledArc($xc,$yc,$w,$h,$s,$e) {
list($xc,$yc) = $this->Rotate($xc,$yc);
$s += $this->a;
$e += $this->a;
parent::FilledArc($xc,$yc,$w,$h,$s,$e);
}
function SetMargin($lm,$rm,$tm,$bm) {
parent::SetMargin($lm,$rm,$tm,$bm);
$this->dx=$this->left_margin+$this->plotwidth/2;
$this->dy=$this->top_margin+$this->plotheight/2;
$this->UpdateRotMatrice();
}
function Rotate($x,$y) {
// Optimization. Ignore rotation if Angle==0 || ANgle==360
if( $this->a == 0 || $this->a == 360 ) {
return array($x + $this->transx, $y + $this->transy );
}
else {
$x1=round($this->m[0][0]*$x + $this->m[0][1]*$y,1) + $this->m[0][2] + $this->transx;
$y1=round($this->m[1][0]*$x + $this->m[1][1]*$y,1) + $this->m[1][2] + $this->transy;
return array($x1,$y1);
}
}
function CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth=-1,$fromHeight=-1,$aMix=100) {
list($toX,$toY) = $this->Rotate($toX,$toY);
parent::CopyMerge($fromImg,$toX,$toY,$fromX,$fromY,$toWidth,$toHeight,$fromWidth,$fromHeight,$aMix);
}
function ArrRotate($pnts) {
$n = count($pnts)-1;
for($i=0; $i < $n; $i+=2) {
list ($x,$y) = $this->Rotate($pnts[$i],$pnts[$i+1]);
$pnts[$i] = $x; $pnts[$i+1] = $y;
}
return $pnts;
}
function Line($x1,$y1,$x2,$y2) {
list($x1,$y1) = $this->Rotate($x1,$y1);
list($x2,$y2) = $this->Rotate($x2,$y2);
parent::Line($x1,$y1,$x2,$y2);
}
function Rectangle($x1,$y1,$x2,$y2) {
// Rectangle uses Line() so it will be rotated through that call
parent::Rectangle($x1,$y1,$x2,$y2);
}
function FilledRectangle($x1,$y1,$x2,$y2) {
if( $y1==$y2 || $x1==$x2 )
$this->Line($x1,$y1,$x2,$y2);
else
$this->FilledPolygon(array($x1,$y1,$x2,$y1,$x2,$y2,$x1,$y2));
}
function Polygon($pnts,$closed=FALSE,$fast=false) {
// Polygon uses Line() so it will be rotated through that call unless
// fast drawing routines are used in which case a rotate is needed
if( $fast ) {
parent::Polygon($this->ArrRotate($pnts));
}
else
parent::Polygon($pnts,$closed,$fast);
}
function FilledPolygon($pnts) {
parent::FilledPolygon($this->ArrRotate($pnts));
}
function Point($x,$y) {
list($xp,$yp) = $this->Rotate($x,$y);
parent::Point($xp,$yp);
}
function StrokeText($x,$y,$txt,$dir=0,$paragraph_align="left",$debug=false) {
list($xp,$yp) = $this->Rotate($x,$y);
return parent::StrokeText($xp,$yp,$txt,$dir,$paragraph_align,$debug);
}
}