Armin: ImageMagick scheint nicht zu funktionieren

Beitrag lesen

Ich habe ein PHP Skript welches ImageMagick verwendet, aber das Bilder verkleinern und in andere Ordner speichern scheint nciht zu funktionieren!

Hier mein Skript:
<?php
$path="/www_global/public/projekte";
$d = dir($path);

while (false !== ($entry = $d->read())) {
 if($entry!="." && $entry!=".." && $entry!="thumbnails" && is_dir($entry)){
  //entry=directory
  //list files
  $files=dir($path."/".$entry);
  ?>
  <table>
   <th colspan="3"><?php print $entry;?></th>
   <tr>
   <?php
   while (false !== ($file = $files->read())) {
    if(is_file($path."/".$entry."/".$file) && strtolower($file)!='thumbs.db'){
     #print $file."<br />";

$hash=md5($path."/".$entry."/".$file);
     $command='/usr/bin/convert '.$path."/".$entry."/".$file.' -resize 20x20> '.$path.'/thumbnails/thumbnail_'.$hash.'.jpg';
     exec($command);
     #print "<pre>".$command."</pre>";
     $command='/usr/bin/convert '.$path."/".$entry."/".$file.' -resize 2048x1536> '.$path.'/thumbnails/big_'.$hash.'.jpg';
     $return=exec($command);
     var_export($return);
     #print "<pre>".$command."</pre>";
     print '<td><a href="/projekte/thumbnails/big_'.$hash.'.jpg"><img src="/projekte/thumbnails/thumbnail_'.$hash.'.jpg" /></a><br />'.$file."</td>";
    }
   }
   ?>
   </tr>
  </table>
  <?php
 }
}
?>

Woran kann das liegen?

lg