PHP Warning: session destroy(): Trying to destroy uninitialized session

1 개요[편집]

PHP Warning: session_destroy(): Trying to destroy uninitialized session
PHP 경고: session_destroy(): 세션을 초기화하지 않고 제거하려 함
[root@zetawiki ~]# grep session_destroy /var/log/httpd/error_log | tail -1
[Thu Aug 20 21:44:38 2015] [error] [client 127.0.0.1] PHP Warning:  session_destroy(): Trying to destroy uninitialized session in /var/www/html/ex/php/session_login/logout.php on line 2, referer: http://zetawiki.com/ex/php/session_login/main.php

2 조치[편집]

변경 전
<?php
session_destroy();
?>
<meta http-equiv='refresh' content='0;url=main.php'>
변경 후
<?php
session_start();
session_destroy();
?>
<meta http-equiv='refresh' content='0;url=main.php'>

3 같이 보기[편집]

4 참고[편집]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}