The problem has to do with the tmp folder, i think. I worked around it for my private wiki by modifying the inc/media.php function media_contentcheck as follows
if(substr($mime,0,6) == 'image/'){
$info = getimagesize($file);
if($mime == 'image/gif' && $info[2] != 1){
msg(sprintf('php function getimagesize(%s) does not think this is an image/gif file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime));
return 0;
}elseif($mime == 'image/jpeg' && $info[2] != 2){
msg(sprintf('php function getimagesize(%s) does not think this is an image/jpeg file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime));
return 0;
}elseif($mime == 'image/png' && $info[2] != 3){
msg(sprintf('php function getimagesize(%s) does not think this is an image/png file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime));
return 0;
}
This function used to return -1 if the info[2] didn't return the right type. Now I just return 0 and show a msg. The debug messages printed out show
php function getimagesize(/srv/www/www.ini.unizh.ch/tmp/phpQu74yf) does not think this is an image/jpeg file (info[2]=0) even though image/jpeg is the mime type
What's going on here? Is this the problem referred to in
http://bugs.splitbrain.org/index.php?do=details&task_id=1232 ?