Ok, I'm having some problems and I asked the questions in an unrelated topic I started on another board. I was asked to ressurect an old thread and post my questions here, so that's what I'm doing. I'll try to bring you up to speed with what I've done so far....
I am having a problem with my new fresh 1.4 installation (not an upgrade)......
I am getting the common error of "Unable to create thumbnail or reduced size image". I have searched the boards and found that is a common problem. I found this thread...
http://forum.coppermine-gallery.net/index.php?topic=23342.0 and followed the instructions to add in picmgmt.inc.php
$fh=fopen($dest_file,'w');
fclose($fh);
above the line
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
I found that line twice around ine 245 and 273. I changed both and the new code looks like this.....
if (!$src_img) {
$ERROR = $lang_errors['invalid_image'];
return false;
}
$dst_img = imagecreate($destWidth, $destHeight);
imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
$fh=fopen($dest_file,'w');
fclose($fh);
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
imagedestroy($src_img);
imagedestroy($dst_img);
break;
case "gd2" :
if (!function_exists('imagecreatefromjpeg')) {
cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed', __FILE__, __LINE__);
}
if (!function_exists('imagecreatetruecolor')) {
cpg_die(CRITICAL_ERROR, 'PHP running on your server does not support GD version 2.x, please switch to GD version 1.x on the admin page', __FILE__, __LINE__);
}
if ($imginfo[2] == GIS_GIF && $CONFIG['GIF_support'] == 1)
$src_img = imagecreatefromgif($src_file);
elseif ($imginfo[2] == GIS_JPG)
$src_img = imagecreatefromjpeg($src_file);
else
$src_img = imagecreatefrompng($src_file);
if (!$src_img) {
$ERROR = $lang_errors['invalid_image'];
return false;
}
if ($imginfo[2] == GIS_GIF)
$dst_img = imagecreate($destWidth, $destHeight);
else
$dst_img = imagecreatetruecolor($destWidth, $destHeight);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $srcWidth, $srcHeight);
$fh=fopen($dest_file,'w');
fclose($fh);
imagejpeg($dst_img, $dest_file, $CONFIG['jpeg_qual']);
imagedestroy($src_img);
imagedestroy($dst_img);
break;
}
I uploaded this new edited file to the server and I got the exact same result; a broken link icon and when clicking on it, I get the same error of "unable to create thumbnail...." Is there anything thing else I can do to try and fix this problem? Thanks for the help.
http://www.applebytexas.com/coppermine/ temp user
username: test
password: test