"[board] 동영상게시판추가" 게시판 질문이예요.. > 질문답변

본문 바로가기

사이트 내 전체검색

뒤로가기 질문답변

"[board] 동영상게시판추가" 게시판 질문이예요..

본문

그동안 잘 쓰고 있었는데..갑자기
Warning: imagepng() expects parameter 3 to be long, string given in /home/p2781iue/public_html/skin/board/zenaplus/movie/list.skin.php on line 74

Warning: chmod() [function.chmod]: No such file or directory in /home/p2781iue/public_html/skin/board/zenaplus/movie/list.skin.php on line 75

이런 문구가 떠버리에요..
그리고 이상한건 전엔 썸파일이 1, 2 .. 순서데로 생겼었는데 확인해보니 썸파일이 만들어지질 않더라고요..

무슨 이유에서인지 도무지 알 수가 없네요..

해결방법이 있으시면 답변 부탁드리겠습니다..

참고로 사이트 주소는
http://acousticsoulproductions.com/bbs/board.php?bo_table=z2_05
입니다..

PHP version은 5.3.10 입니다.
추천0

댓글목록 8

제로님의 댓글

제로쪽지보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

imagepng 이부분을 수정해 보세요..

imagejpeg

pahs님의 댓글

pahs쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

zero님 감사합니다..

그런데 감이 영 안잡혀서요,, 죄송합니다..
혹시 아래 소스에서 어디를 고처봐야 될른지좀 봐주실 수 있으세요..
movie에 list.skin.php 입니다..

<?
if (!defined("_GNUBOARD_")) exit;

$colspan = 5;

//if ($is_category) $colspan++;
if ($is_checkbox) $colspan++;
if ($is_good) $colspan++;
if ($is_nogood) $colspan++;

$mod = $board[bo_gallery_cols];
$td_width = (int)(100 / $mod);
?>

<div id="idList">

<!-- fboardlist -->
<form name="fboardlist" method="post" style="margin:0;">
<input type='hidden' name='bo_table' value='<?=$bo_table?>'>
<input type='hidden' name='sfl'  value='<?=$sfl?>'>
<input type='hidden' name='stx'  value='<?=$stx?>'>
<input type='hidden' name='spt'  value='<?=$spt?>'>
<input type='hidden' name='page' value='<?=$page?>'>
<input type='hidden' name='sw'  value=''>

<div style="height:5px; line-height:1px; font-size:1px; clear:both;">&nbsp;</div>
<div style="border-bottom:1px solid #DDD;"></div>
<div style="height:10px; line-height:1px; font-size:1px; clear:both;">&nbsp;</div>
<table class="board_list" summary="<?=$board[bo_subject]?>">
<caption><?=$board[bo_subject]?></caption>
<tr>
<?
for ($i=0; $i<count($list); $i++)
{
if ($i && $i%$mod==0)
echo "</tr><tr>";

if ($board[thumb] == "1") {
$img = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// thumb
if (!file_exists($thumb)) {
if ($list[$i][file][0][file]){
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}elseif ($list[$i][file][1][file]){
$file = $list[$i][file][1][path] .'/'. $list[$i][file][1][file];
}elseif ($list[$i][file][2][file]){
$file = $list[$i][file][2][path] .'/'. $list[$i][file][2][file];
}else{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}
// getimage
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($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);

if ($height < $board[bo_2])

$dst = imagecreatetruecolor($board[bo_1], $height);
else

$dst = imagecreatetruecolor($board[bo_1], $board[bo_2]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $config[cf_3]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
} else if ($board[thumb] == "2") {
$img = "";
$thumb = $thumb_path.'/'.$list[$i][wr_id];
// thumb
if (!file_exists($thumb)) {
if ($list[$i][file][0][file]){
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}elseif ($list[$i][file][1][file]){
$file = $list[$i][file][1][path] .'/'. $list[$i][file][1][file];
}elseif ($list[$i][file][2][file]){
$file = $list[$i][file][2][path] .'/'. $list[$i][file][2][file];
}else{
$file = $list[$i][file][0][path] .'/'. $list[$i][file][0][file];
}
// getimage
if (preg_match("/\.(jp[e]?g|gif|png)$/i", $file) && file_exists($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 */
/*
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);

$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.'/'.$list[$i][wr_id], $board[bo_2]);
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
*/

$rate = $board[bo_2] / $size[1];
$width = (int)($size[0] * $rate);

//echo "rate : $rate ,width : $width, $height : $board[bo_2] <br>";
if($width <= $board[bo_1]) { //width rate
$dst = imagecreatetruecolor($width, $board[bo_2]);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $width, $board[bo_2], $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
} else {
$rate = $board[bo_1] / $size[0];
$height = (int)($size[1] * $rate);
$dst = imagecreatetruecolor($board[bo_1], $height);
imagecopyresampled($dst, $src, 0, 0, 0, 0, $board[bo_1], $height, $size[0], $size[1]);
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $board[bo_2]);
}
chmod($thumb_path.'/'.$list[$i][wr_id], 0606);
}
}
}
// no thumds

if (file_exists($thumb))
$img = "<img src='$thumb' border='0' style='vertical-align:middle;'>";
else
if(preg_match("/\.(swf|wma|asf)$/i","$file") && file_exists($file))
{ $img = "<script>doc_write(flash_movie('$file', 'flash$i', '$board[bo_1]', '$board[bo_2]', 'transparent'));</script>"; }

$style = "";
if ($list[$i][is_notice]) $style = " style='font-weight:700;'";

$subject = "<span $style>".cut_str($list[$i][subject],60)."</span>";

$comment_cnt = "";
if ($list[$i][comment_cnt])
$comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:Tahoma,Verdana,Osaka,MS PGothic,Gulim,sans-serif;font-size:10px;color:#EE5A00;'>{$list[$i][comment_cnt]}</span></a>";

echo "<td width='{$td_width}%' align='center' valign='top'>";
if (file_exists($thumb)) {
echo "<table><tr><td class='list_img_bg'>";
echo "<a href='{$list[$i][href]}'>$img</a>";
echo "</td></tr></table>";
}
echo "<table><tr><td align=center>";
?>
<a href="<?=$board_skin_path?>/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$i][wr_id]?>" onclick="window.open(this.href, 'movie', 'left=200, top=200, width=660, height=460, scrollbars=0');return false;"><img src="<?=$board_skin_path?>/img/btn_movie.gif" border="0" style='vertical-align:middle;'></a>
<br />
<?
echo "<a href='{$list[$i][href]}'>$subject</a>{$comment_cnt}</td></tr>";
if ($is_category) echo "<tr><td align=center><span class=small><font color=gray>[<a href='{$list[$i][ca_name_href]}'>{$list[$i][ca_name]}</a>]</font></span></a></td></tr>";
if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";
echo "<tr><td height=5></td></tr>";
echo "</table></td>\n";
}

// td
$cnt = $i%$mod;
if ($cnt)
for ($i=$cnt; $i<$mod; $i++)
echo "<td width='{$td_width}%'>&nbsp;</td>";
?>
</tr>
<tr><td colspan='<?=$colspan?>' height="1" bgcolor="#dddddd"></td></tr>

<? if (count($list) == 0) { echo "<tr><td colspan='$colspan' height=100 align=center>No Posting found.</td></tr>"; } ?>
</tbody>
</table>
</form>
<!-- // fboardlist -->
</div>


죄송합니다..ㅜㅜ

제로님의 댓글

제로쪽지보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

코드 보시면
imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $config[cf_3]);
이런부분들 수정하시면 됩니다,...

pahs님의 댓글

pahs쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

제로님 답변 감사드립니다.

그런데

imagepng($dst, $thumb_path.'/'.$list[$i][wr_id], $config[cf_3]);  을
imagejpeg($dst, $thumb_path.'/'.$list[$i][wr_id], $config[cf_3]);  로 바꾸었는데도 여전히 파일이 안생겨지네요..

죄송하지만 수정을 잘 못 한건가요..??

제로님의 댓글의 댓글

제로쪽지보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

확인해 보니 만들어 지신거 같은데요..

pahs님의 댓글

pahs쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

thumb 파일이 살아있어서 안된긋 해요..
그래서 Data에 thumb 하고 phpMyAdmin 들을 다 지우고 다시 하니까 되네요..^^
메인페이지 에러문구는
    //$arr_notice = split("\n", trim($board_list[$i]['bo_notice']));
    //if(in_array($list[$i]['wr_id'], $arr_notice)) $list[$i]['is_notice']=true;

    //echo "<!--".$board_list[$i]['bo_table']."/".$board_list[$i]['bo_notice']."-->";
이것을 주석처리해버렸어요..

이래도 되는거겠죠..??

어제오늘 제로님 덕분에 공부 많이 했습니다..
여긴 캐나다라 밤낮이 바뀌어서 대화가 어렵네요..^^

감사합니다..

제로님의 댓글의 댓글

제로쪽지보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

썸은 한번생성이 된후 재생성을 하시려면 삭제를 해줘야 합니다..
어떤방법으로든 다시 생성이 되면 됩니다...

pahs님의 댓글

pahs쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

헐...
해결된줄 알았는데. 이상하네요..
전에 올렸던 파일들이 살아있나봐요..
분명히 FTP까지 들어가서 섬파일(폴더까지) 다 지웠었는데 전에 올린섬이 다시 나와요..
그리고 에러메시지가 또 나오네요..거 이상하네 서버를 리셋 해야 되나요..?

전체 1,640건 9 페이지
게시물 검색
Copyright (c) 株式会社YHPLUS. All rights reserved.

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒171-0014 東京都豊島区池袋2-41-5 アーバン154 8F
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

PC 버전으로 보기