Grazie 1000... questo è quello che mi viene stampato a video:
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'repository/public%2Fvillages%2F10%2F2006%2F2.jpg§191_144' for writing: Permission denied in /home/www/5bdf89763527da301a723c15f36dcee6/web/v2/resizer.php on line 78

Warning: imagecreatefromjpeg(repository/public%2Fvillages%2F10%2F2006%2F2.jpg§191_144) [function.imagecreatefromjpeg]: failed to open stream: No such file or directory in /home/www/5bdf89763527da301a723c15f36dcee6/web/v2/resizer.php on line 22

Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/www/5bdf89763527da301a723c15f36dcee6/web/v2/resizer.php on line 23

Warning: imagedestroy(): supplied argument is not a valid Image resource in /home/www/5bdf89763527da301a723c15f36dcee6/web/v2/resizer.php on line 24


e questo qui sotto è il file che fa il resize:
Codice PHP:
<?php
require("globals.inc");
header ("Content-type: image/jpeg");

if(!
file_exists($img_path))
{
    
$im imagecreatetruecolor($w$h);
    
$bg imagecolorallocate($im255255255); 
    
$text_color imagecolorallocate($im000);
    
imagestring($im22010,  "Non disponibile"$bg);
    
imagejpeg($im""100);
    
imagedestroy($im);    
}
else
{
    
$cachedpath getCachedPath($img_path$w$h);
    if(!
file_exists($cachedpath))
    {
        
ResizeImage($img_path$w$htrue);
    }
    
    
$source ImageCreateFromJPEG($cachedpath);
    
imagejpeg($source""80);
    
imagedestroy($source);
}
    
//ResizeImage("public/temp.jpg", 20, 20, true);


function ResizeImage($filename$th_width$th_height$forcefill)
{    
    global 
$_repository;
    list(
$width$height) = getimagesize($filename);

   if(
substr($filenamestrlen($filename) - 33) == "jpg")
        
$source ImageCreateFromJPEG($filename);
   
   if(
substr($filenamestrlen($filename) - 33) == "gif")
        
$source ImageCreateFromGIF($filename);
   
   if(
substr($filenamestrlen($filename) - 33) == "png")
        
$source ImageCreateFromPNG($filename);
    
   if(
$width $th_width || $height $th_height)
   {
     
$a $th_width/$th_height;
     
$b $width/$height;

     if((
$a $b)^$forcefill)
     {
         
$src_rect_width  $a $height;
         
$src_rect_height $height;
         if(!
$forcefill)
         {
           
$src_rect_width $width;
           
$th_width $th_height/$height*$width;
         }
     }
     else
     {
         
$src_rect_height $width/$a;
         
$src_rect_width  $width;
         if(!
$forcefill)
         {
           
$src_rect_height $height;
           
$th_height $th_width/$width*$height;
         }
     }

     
$src_rect_xoffset = ($width $src_rect_width)/2*intval($forcefill);
     
$src_rect_yoffset = ($height $src_rect_height)/2*intval($forcefill);

     
$thumb  imagecreatetruecolor($th_width$th_height);
     
     
     
       
imagecopyresampled($thumb$source00$src_rect_xoffset$src_rect_yoffset$th_width$th_height$src_rect_width$src_rect_height);
       
$cachedpath getCachedPath($filename$th_width$th_height);
       
imagejpeg($thumb$cachedpath80);
       
imagedestroy($thumb);
   }
   else
   {
       
imagejpeg$source,""80);
       
imagedestroy($source);
   }
}

function 
getCachedPath($filename$w$h)
{
    global 
$_repository
    
$encodedname urlencode($filename) . "§" $w "_" $h;
    
$cachedpath $_repository "/" $encodedname;

    return 
$cachedpath;
}
  
?>
Non so se la soluzione al problema puo essere nascosta nei warning... io ho pensato subito ad una questione di permessi e basta... sono molto confuso dal fatto che alcune foto funzionano e altre no... bhoo