"[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

댓글목록

profile_image

제로님의 댓글

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

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

imagejpeg

profile_image

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>


죄송합니다..ㅜㅜ

profile_image

제로님의 댓글

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

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

profile_image

pahs님의 댓글

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

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

그런데

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

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

profile_image

제로님의 댓글의 댓글

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

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

profile_image

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']."-->";
이것을 주석처리해버렸어요..

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

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

감사합니다..

profile_image

제로님의 댓글의 댓글

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

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

profile_image

pahs님의 댓글

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

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

Total 1,640건 9 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
1520 다소미쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7253 0 08-28
1519 다소미쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6307 0 08-26
1518 다소미쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 13839 0 08-26
1517 김성수쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7578 0 08-13
1516 프리즘볼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 14207 0 08-08
1515 프리즘볼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12055 0 07-28
1514 김성수쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15084 0 07-06
1513 프리쏘울쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8202 0 06-22
1512 미라쿨OnA쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9898 0 06-02
1511 미라쿨OnA쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8 0 05-25
1510 미라쿨OnA쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6632 0 05-24
1509 빈이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 9760 0 05-09
1508 기쁨으로쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 18871 0 05-04
1507 빈이쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12075 0 04-21
열람중 pahs쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 15627 0 04-20

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
4,183
어제
4,345
최대
6,509
전체
1,064,278
Copyright (c) 株式会社YHPLUS. All rights reserved.