Solved - Codeigniter Message: mkdir(): Invalid path and Session: Configured save

Bertemu lagi dengan masalah :p
Masalah yang saya temui di Codeigniter 3.0, namun masalah ini tidak hanya di versi 3.x saja mungkin di versi sebelumnya juga ada.

Konsidi masalah :
Webserver : Nginx
Php : PHP 5.6
FrameWork : Codeigniter 3.

masalah yang muncul ada 3 tapi cara mengatasinya hanya dalam 1 baris code, sebelumnya lihat kode errornya ada dibawah ini :

A PHP Error was encountered
Severity: Warning
Message: mkdir(): Invalid path
Filename: drivers/Session_files_driver.php
Line Number: 117
Backtrace:
File: /usr/share/nginx/html/ci/index.php
Line: 292
Function: require_once

An uncaught Exception was encountered
Type: Exception
Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.
Filename: /usr/share/nginx/html/ci/system/libraries/Session/drivers/Session_files_driver.php
Line Number: 119
Backtrace:
File: /usr/share/nginx/html/ci/index.php
Line: 292
Function: require_once

A PHP Error was encountered
Severity: Warning
Message: fopen(ea936f6cca00382143f867cea8043f45d9b818c2): failed to open stream: Permission denied
Filename: drivers/Session_files_driver.php
Line Number: 156
Backtrace:

Cara mengatasinya :
1. Buka file config.php dalam direktori Codeigniter 
2. Temukan kode berikut :

$config['sess_save_path'] = NULL;

3. Ganti menjadi :

$config['sess_save_path'] = sys_get_temp_dir();

sumber: http://allelearnings.blogspot.co.id/2015/12/solved-codeigniter-message-mkdir.html?m=1

Tidak ada komentar:

Diberdayakan oleh Blogger.