I have to render something with Imagick on PHP CLI. I have noticed that every 3-5 days the server memory gets full, so i can\'t even connet via ssh or ftp.
with memo
xdebug wasn't able to help me.. so i decided do look out for another solution. i came up with using image magic direct:
$sourceImg = 'source.png';
$destImg = 'dest.png';
$background ='#00ff00';
$command = "convert {$sourceImg}";
$out = array();
for($i=1;$i<=5;$i++){
$command .= " -fill \"{$background}\" ";
$command .= " -draw 'rectangle {$x1},{$y1} {$x2},{$y2}'";
}
$command .= " {$destImg}";
exec($command,$out);
this solutions works way smoother then the imagick one. but i don't like the error-prone code.