Warning: Cannot modify header information > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

Warning: Cannot modify header information 정보

Warning: Cannot modify header information

본문

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\lib\common.lib.php on line 109

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 32

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 34

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 35

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 36

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 37

Warning
: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\lib\common.lib.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 38

타 서버로 이동을 했는데 이런오류가 생기네요
기존서버에는 이런문제 점들없이 잘 되엿는데 이상하네요
답변부탁드립니다 .


<?
// 生成新文件必须包含此文件
if (!defined("_GNUBOARD_")) exit; // 禁止单独页面访问

$begin_time = get_microtime();

if (!$g4['title'])
    $g4['title'] = $config['cf_title'];

// 短信确认
if ($member['mb_memo_call']) {
    $mb = get_member($member[mb_memo_call], "mb_nick");
    sql_query(" update {$g4[member_table]} set mb_memo_call = '' where mb_id = '$member[mb_id]' ");

    alert("您有新短信息,来至会员".$mb[mb_nick], $_SERVER[REQUEST_URI]);
}


// 在线人数
//$lo_location = get_text($g4[title]);
//$lo_location = $g4[title];
// 论坛标题中如果含有(')将出现错误
$lo_location = addslashes($g4['title']);
if (!$lo_location)
    $lo_location = $_SERVER['REQUEST_URI'];
//$lo_url = $g4[url] . $_SERVER['REQUEST_URI'];
$lo_url = $_SERVER['REQUEST_URI'];
if (strstr($lo_url, "/$g4[admin]/") || $is_admin == "super") $lo_url = "";

// 자바스크립트에서 go(-1) 함수를 쓰면 폼값이 사라질때 해당 폼의 상단에 사용하면
// 캐쉬의 내용을 가져옴. 완전한지는 검증되지 않음
header("Content-Type: text/html; charset=$g4[charset]");
$gmnow = gmdate("D, d M Y H:i:s") . " GMT";
header("Expires: 0"); // rfc2616 - Section 14.21
header("Last-Modified: " . $gmnow);
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
?>

댓글 전체

Warning: Cannot modify header information 이란 메세지는 이전에 다른 문제로 인하여 생긴 메세지입니다.

말 그대로 헤더 정보(십중팔구 에러)가 이미 브라우져에 보내졌기 때문입니다.

일단 log 파일을 확인하시고 처음의 문제점을 찾으셔야 합니다.
log 파일이라면요 어디를 만져야 하는가요 ?
현재 로그인도 않되는 상태입니다 어제까지는 정말 잘되던 로그인마저 않됩니다 ㅜㅜㅠ
lib\common.lib.php 파일의 첫번째 칸에 공백이 있던가 뛰워져 있지 않나요..
<? 이 문자까 첫칸에 와야 하는데 첫칸에 있지 않고 한칸이 뛰워져 있다던가 다른 문자가 있다던가요.
감사합니다 그건 해결이 되엿습니다 한칸이 뛰여져 있네요 그러니 다른 오류가 생겨요
Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\common.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 32

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 35

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 36

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 37

Warning: Cannot modify header information - headers already sent by (output started at C:\APMServ5.2.0\www\htdocs\index.php:1) in C:\APMServ5.2.0\www\htdocs\head.sub.php on line 38
head.sub.php on line 34~38

34~38번째 줄 내용입니다 .
header("Content-Type: text/html; charset=$g4[charset]");
$gmnow = gmdate("D, d M Y H:i:s") . " GMT";
header("Expires: 0"); // rfc2616 - Section 14.21
header("Last-Modified: " . $gmnow);
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1
header("Pragma: no-cache"); // HTTP/1.0
타 서버로 옮기실때 어떤 방법을 사용했는지 모르겠는데 정상적으로 잘 동작하던 소스가 곳곳에서 저런문제가 있다면 FTP전송중에 문제가 있는거 같습니다.

이전서버에서 압축을 한 후에 새로운 서버에 압축파일들 올린뒤에 새로운 서버에서 압축을 풀어서 해보시는건 어떨지 모르겠네요.
UTF-8 로 새로운 걸로 저장 하면 됩니다.
기존파일에서 UTF-8 버전이 아닌 다른 걸로 저장이 되어서 그런현상이 발생합니다.

원격으로 새로운 걸로 저장해서 파일 덮어 쓰기 하십시오.
오늘 수정하다가 이 문제로 고생했는데...ㅎㅎ
저는 아크로에디터를 쓰고 있는데, 아무리 해도 안되더라구요.
그런데, 파일 메뉴에서 '변환 > 유니코드 ROM에 저장'에 체크가 있길래 끄고 다시 저장한다음 덮어 쓰니까 제대로 나옵니다.
참고하세요. ^^
저도 이 문제로 오늘 고생 좀 했습니다.

Warning: Cannot modify header information - headers already sent by (output started at /home/www/dbconfig.php:1) in /home~~~ 이후는 본문 증상과 동일

제 경우는 디비 암호 변경밖에 안 했는데 그랬어요.
결국 해결했는데요,
utf-8로 사용 중이고,
에디트플러스 3.10 쓰는데, 에프티피 설정에서 패시브엡티피 체크 지우고 저장했더니 해결 됐습니다.
아마도 패시프앱티피를 적용하지 않는 서버에 저장하면서 문제가 된건 가봐요.
패시브앱티피는 전송 시작하면서 앞에 뭘 더 딸려보내는 모양입니다.
전체 66,558 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT