강의 컨설팅 트레이닝 무료진단 무료책자 마케팅편지 마케팅정보공유 다이어리 서비스제휴 고객센터

Warning: session_register(): Cannot send session cache limiter
작성자 : 13 김영철
등록날짜 : 2009.01.14 21:57
1,424

Warning: session_register(): Cannot send session cache limiter - headers already sent

 

 

해결책:

 

우선

session_start();를 썼는지 봐야한다.

session.auto_start가 default값이 off이다.

다음 아래 문장을 참고.

 

You have to set the cookie before you send any HTML. setcookie() defines a cookie to be sent along with the rest of the header information. Cookies must be sent before any other headers are sent (this is a restriction of cookies, not PHP). This requires you to place calls to this function before any <html> or <head> tags.

Most common reason for this error is extra empty lines at the end of your php file. Delete those, and the error should not appear, as long as you have not made any other errors within your script. So check for empty lines before and after your PHP tags <?php or <? tag in db_connect.php that will cause such errors. Try to add @ before function names when calling and you don't want warnings & notices printout.

In advance, Generally you cannot echo anything BEFORE you register a session (I repeat - if its behaviour is similar to cookie). If you want to register a cookie, you must call the SetCookie procedure before that echo. And this seems to be simmilar problem. You use echo so HTTP Headers are sent and the session registration will fail. You have to set session_start(), session_register('username'); first before the echo and also you need to make sure the cookies/sessions are enabled and output_buffering= On in your php.ini file


출처 : Tong - 드렁크수달스님의 ■ PHP ■통

"쇼핑몰·홈페이지·오픈마켓
블로그·페이스북·이메일 등의 각종 마케팅 글쓰기,
각종 광고, 영업, 판매, 제안서, 전단지
반응율 3배×10배 이상 높이는 마법의 8단계 공식"
자세히보기

Comments

번호 제목 글쓴이 날짜 조회
3165 event.srcElement 99 단국강토 02.10 1423
3164 한글 및 이미지 정렬 M 최고의하루 12.19 1424
3163 table 태그를 알자 99 단국강토 02.10 1424
열람중 Warning: session_register(): Cannot send session cache limiter 13 김영철 01.14 1425
3161 액션스크립 정의 99 단국강토 01.12 1426
3160 [ PHP ] PHP has encountered an Access Violation at 77FCAFE6 M 최고의하루 12.19 1427
3159 Smarty QuickStart Guide 13 김영철 01.14 1427
3158 word-break:break-all, nowrap 유용하게 쓰기 M 최고의하루 12.26 1428
3157 me 속성 , rules 속성 99 단국강토 01.19 1428
3156 MSSQL Server DBA 가이드-2 M 최고의하루 12.26 1429
3155 [설치/설정] 확장모듈 설치 방법 13 김영철 01.14 1430
3154 MSSQL Server DBA 가이드-1 M 최고의하루 12.26 1431
3153 RSS 포멧과 구독기 만들기-2 M 최고의하루 12.24 1434
3152 FORM 태그 기본 ★ M 최고의하루 12.20 1435
3151 php5 99 단국강토 01.02 1435
3150 웹페이지의 특정 부분만 인쇄 99 단국강토 02.16 1437
3149 inner html 99 단국강토 02.16 1439
3148 class.layout을 사용한 동적인 웹페이지 13 김영철 01.13 1439
3147 table을 엑셀 편집 하듯이 M 최고의하루 12.23 1440
3146 플래쉬 강좌 - 이음새없이 흐르는 이미지 99 단국강토 01.06 1440
3145 자바스크립트의기본 99 단국강토 02.10 1442
3144 IE 패치, 플래쉬 활성화 시키기, 플래쉬 점선 없애기 99 단국강토 02.02 1442
3143 파일업로드 썸네일 제작 class 13 김영철 01.13 1442
3142 Eclipse에서 Php 사용하기 13 김영철 01.13 1445
3141 [쇼핑몰구축] PHP 사용 함수 설명 13 김영철 01.13 1448
3140 PHP 성능 튜닝 관련 글 13 김영철 01.14 1448
3139 테이블 타이틀 내용과 같이 스크롤 99 단국강토 02.19 1452
3138 [hatelove님의 JBBS 알고리즘 강좌 11] 13 김영철 01.14 1452
3137 MS-SQL2005에서 2000 DTS Package 보기 13 김영철 01.23 1458
3136 php 파일 업, 다운로드 13 김영철 01.13 1461
마케팅
특별 마케팅자료
다운로드 마케팅자료
창업,경영
기획,카피,상품전략
동기부여,성취