CI 묻고 답하기

제목 autoload로 session을 불러올시;
글쓴이 정수리 작성시각 2016/06/03 13:09:30
댓글 : 2 추천 : 0 스크랩 : 1 조회수 : 18756   RSS

세션쪽 공부를 해볼려고 하던 중

 

autoload[libraries']=array('session') 하여

 

불러오니 에러를 내뿜는데 어느곳이 에러인지모르겠습니다;

A PHP Error was encountered

Severity: Warning

Message: mkdir(): Invalid path

Filename: drivers/Session_files_driver.php

Line Number: 117

Backtrace:

File: C:\web\Apache24\htdocs\application\controllers\topic.phpLine: 5Function: __construct

File: C:\web\Apache24\htdocs\index.phpLine: 315Function: require_once

 

Warning: Uncaught Exception: Session: Configured save path '' is not a directory, doesn't exist or cannot be created. in C:\web\Apache24\htdocs\system\libraries\Session\drivers\Session_files_driver.php:119 Stack trace: #0 [internal function]: CI_Session_files_driver->open('', 'ci_session') #1 C:\web\Apache24\htdocs\system\libraries\Session\Session.php(140): session_start() #2 C:\web\Apache24\htdocs\system\core\Loader.php(1292): CI_Session->__construct() #3 C:\web\Apache24\htdocs\system\core\Loader.php(1185): CI_Loader->_ci_init_library('Session', 'CI_', NULL, 'session') #4 C:\web\Apache24\htdocs\system\core\Loader.php(1048): CI_Loader->_ci_load_stock_library('Session', 'Session/', NULL, NULL) #5 C:\web\Apache24\htdocs\system\core\Loader.php(1093): CI_Loader->_ci_load_library('Session', NULL, NULL) #6 C:\web\Apache24\htdocs\system\core\Loader.php(218): CI_Loader->_ci_load_library('Session', NULL, NULL) #7 C:\web\Apache24\htdocs\system\core\Loader.php(202): CI_Loader->library('session', NULL) #8 C:\web\Apache24\htdocs\s in C:\web\Apache24\htdocs\system\libraries\Session\drivers\Session_files_driver.php on line 119Fatal error: session_start(): Failed to initialize storage module: user (path: ) in C:\web\Apache24\htdocs\system\libraries\Session\Session.php on line 140

 

이런 엄청난 양의 에러는 내뿜는데;; 어느곳에서 설정을 잘못한것일까요?

 다음글 session 공부 중에 궁금증이 생겨 글을 올리게 되... (4)
 이전글 보안문자 이미지 출력 시, 로컬에서는 정상 출력되는데 ... (4)

댓글

한대승(불의회상) / 2016/06/03 13:22:47 / 추천 0

CI3.0 부터 세션의 기본설정이 PHP네이티브로 바뀌었습니다. 세션파일 경로부분에 문제가 있는것 같습니다.

config/config.php 파일 오픈 한 후 아래 부분 찾아서 경로를 설정해 주세요.

$config['sess_save_path'] = NULL // ex> $config['sess_save_path'] = '/tmp';

서버가 linux 라면 쓰기 권한이 설정 되어 있어야 합니다.

정수리 / 2016/06/03 13:40:11 / 추천 0
@한대승 아 감사합니다^^ 덕분에 해결하였네요 ^^