try the ``system'' function
--- cut here ---
system("convert -font 'arial' -fill white -draw 'text 25,25 www.test.nu' $filename $filename",$failure);
if ($failure){
echo "couldn't convert the image";
}else{
echo 'SUCCESS';
}
--- cut here ---
if this doesnt work, see if convert is executable, and if your server has permission to run it.
Also try to run it from command line to see if it works.