Topic: avatar upload problem
I am using punLA, a variation of punBB.
info:
Punbo version Punbo 0.3
PunBB version PunBB 1.2.8
system: Linux
PHP: 4.4.2 - Show info
Accelerator: N/A Database MySQL 4.0.27-standard
Rows: 1043
Size: 1.36 MB
The img/avatar directory is chmoded to 777
when I try to upload an avatar I hey a php error:
Warning: getimagesize(img/avatars/3.tmp): failed to open stream: No such file or directory in /home/divadevo/public_html/components/com_punbo/board/profile.php on line 377
and then in the info box for the BB I get:
The file you tried to upload is wider and/or higher than the maximum allowed 100x100 pixels
but its 100x99
so its not too big.
Line 377 is here:
LINE 376 // Now check the width/height
LINE 377 ------>>>>>> list($width, $height, $type,) = getimagesize($pun_config['o_avatars_dir'].'/'.$id.'.tmp');
if (empty($width) || empty($height) || $width > $pun_config['o_avatars_width'] || $height > $pun_config['o_avatars_height'])
{
@unlink(PUN_ROOT.$pun_config['o_avatars_dir'].'/'.$id.'.tmp');
return message($lang_profile['Too wide or high'].' '.$pun_config['o_avatars_width'].'x'.$pun_config['o_avatars_height'].' '.$lang_profile['pixels'].'.');
}
else if ($type == 1 && $uploaded_file['type'] != 'image/gif') // Prevent dodgy uploads
{
@unlink($pun_config['o_avatars_dir'].'/'.$id.'.tmp');
message($lang_profile['Bad type']);
}