기본 스킨 gd_gallery 정보
기본 스킨 gd_gallery본문
php 4에서 5로 업그레이드 후 섬네일이 생성되지 않습니다.
| GD Support | enabled |
| GD Version | bundled (2.0.28 compatible) |
| FreeType Support | enabled |
| FreeType Linkage | with freetype |
| FreeType Version | 2.1.5 |
| GIF Read Support | enabled |
| GIF Create Support | enabled |
| JPG Support | enabled |
| PNG Support | enabled |
| WBMP Support | enabled |
| XBM Support | enabled |
GD는 아파치에 정상적으로 인크루드 된 것 같은데
어디를 고쳐야 할까요?
아래는 gd_gallery의 write_update.skin.php입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
//print_r2($_FILES); exit;
$data_path = $g4[path]."/data/file/$bo_table";
$thumb_path = $data_path.'/thumb';
$thumb_path = $data_path.'/thumb';
if ($_FILES[bf_file][name][0])
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
{
$row = sql_fetch(" select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '0' ");
$file = $data_path .'/'. $row[bf_file];
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file))
{
$size = getimagesize($file);
if ($size[2] == 1)
$src = imagecreatefromgif($file);
else if ($size[2] == 2)
$src = imagecreatefromjpeg($file);
else if ($size[2] == 3)
$src = imagecreatefrompng($file);
else
break;
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$height = (int)($size[1] * $rate);
@unlink($thumb_path.'/'.$wr_id);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$wr_id, $board[bo_2]);
chmod($thumb_path.'/'.$wr_id, 0606);
}
}
?>
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$wr_id, $board[bo_2]);
chmod($thumb_path.'/'.$wr_id, 0606);
}
}
?>
댓글 전체
Fatal error: imagepng() [<a href='function.imagepng'>function.imagepng</a>]: gd-png: fatal libpng error: zlib error in /home/mig29/www/bbs/skin/board/gd_gallery/list.skin.php on line 90
이런 에러가 뜨는군요..
이런 에러가 뜨는군요..
imagepng($dst, $thumb_path.'/'.$wr_id, $board[bo_2]);
임시 대처 방법.
png 부분을 gif 혹은 jpeg로 바꿔보세요...
임시 대처 방법.
png 부분을 gif 혹은 jpeg로 바꿔보세요...