Hi.
I've some problem with GD library in php5. Namely I try to draw a rectangle over two elipses. It works on my development machine, but not on a production server:
$fL = $params['L']; if ($fL < 0.0005*$params['Dz'] + 1.0) $fL = 0.0005*$params['Dz'] + 1.0;
$iX1 = (int)($fScale*($fPictureHorMargin + 0.5 - 0.00025*$params['Dz'])); $iY1 = $iPictureY - (int)($fScale*($params['PP'] - $fPicturePP + $fPictureBottomMargin));
$iX2 = (int)($fScale*($fPictureHorMargin + 0.5 + 0.00025*$params['Dz'])); $iY2 = $iY1 - (int)(0.001*$fScale*$params['Dz']);
$Xc = ($iX1+$iX2)/2;
$Yc = ($iY1+$iY2)/2;
$W = abs($iX1-$iX2);
$H = abs($iY1-$iY2);
imagefilledellipse($im,$Xc, $Yc, $W, $H,$red);//<<<<<------------FIRST ELLIPSE
$iX1 = (int)($fScale*($fL + $fPictureHorMargin - 0.5 - 0.00025*$params['Dz'])); $iY1 = $iPictureY - (int)($fScale*($params['PP'] - $fPicturePP + $fPictureBottomMargin));
$iX2 = (int)($fScale*($fL + $fPictureHorMargin - 0.5 + 0.00025*$params['Dz'])); $iY2 = $iY1 - (int)(0.001*$fScale*$params['Dz']);
$Xc = ($iX1+$iX2)/2;
$Yc = ($iY1+$iY2)/2;
$W = abs($iX1-$iX2);
$H = abs($iY1-$iY2);
imagefilledellipse($im,$Xc, $Yc, $W, $H,$red);//<<<<<------------SECOND ELLIPSE
$iX1 = (int)($fScale*($fPictureHorMargin + 0.5)); $iY1 = $iPictureY - (int)($fScale*($params['PP'] - $fPicturePP + $fPictureBottomMargin));
$iX2 = (int)($fScale*($fL + $fPictureHorMargin - 0.5)); $iY2 = $iY1 - (int)(0.001*$fScale*$params['Dz']);
imagefilledrectangle($im,$iX1, $iY1, $iX2, $iY2,$red);//<<<<<----------- RECTANGLE NOT DRAWN
I checked that coordinates on both servers are exactly the same. The servers are alike (Apache 2.0 +php 5.2). Gd was installed on both with debian's apt-get. The only difference is that the one that draws the rectangle used testing (lenny) repositories and the one that doesn't - stable (that is etch). phpinfo reports in both cases gd version "2.0 or higher".
Is this some kind of glitch or am I missing something obvious?
You can observe the failure to draw the rectangle between two elipses on http://adso.nawigus.pl/kwh/obrazek.php?width=600&height=300&PT=2.93&ZWG=2.5&PP=0.81&Dz=1360&Lf=3&Hf=0.3&Bf=0.2&n=2&L=4.42
The picture, as it renders on my localhost, is showed in an attachment.