0
votes

Type: UnexpectedValueException

Message: Session: Configured driver 'files' was not found. Aborting.

Filename: /var/www/html/m-ticket/system/libraries/Session/Session.php

Line Number: 230

Backtrace:

File: /var/www/html/m-ticket/application/controllers/Home.php Line: 8 Function: __construct

File: /var/www/html/m-ticket/index.php Line: 292 Function: require_once

I copied this project from Windows and I would like to put it in Linux' localhost/m-ticket (/var/www/html/m-ticket) and I changed base_url localhost/m-ticket but I still got the error.

I read this Session: Configured driver 'files' was not found. Aborting

but it doesn't solve my problem

this is my autoload.php

defined('BASEPATH') OR exit('No direct script access allowed');
$autoload['packages'] = array();
$autoload['libraries'] = array('database','session');
$autoload['drivers'] = array('files');
$autoload['helper'] = array('file');
$autoload['config'] = array();
$autoload['language'] = array();
$autoload['model'] = array();

and also there's a helper in one of controllers

$this->load->helper(array('form', 'url', 'file', 'html', 'text', 'tgl', 'date'));

if I delete files from drivers autoload, it back to the Type: UnexpectedValueException

1
It's clearly saying you that files was not found , as it is a helper not a driver , show us your autoload file - Arsh Singh
Thank you .. it does solve my problem but I still get this error Unable to load the requested file: helpers/files_helper.php - Ampersanda
it should be a file not files ,,, always do check the user guide for codeigniter : codeigniter.com/user_guide - Arsh Singh
it doesnt give me the file which have encountered the error, where do i have to change it? - Ampersanda
inside auto load , replace : files with file in helper , let me post it as answer , with details - Arsh Singh

1 Answers

0
votes

First of all files is not a valid driver , what you are looking for is a file helper which contains functions that assist in working with files. , so what you have to do is open autoload.php and

remove the files from

$autoload['drivers'] = array('files'); // remove files from this array

and add file inside helper

$autoload['helper'] = array('file');

as file is a helper not a driver , drivers can be cache , session ,database

and also seems like you have problems with saving the sessions , so this the following steps as well :

go to :

application/config/

and open

config.php

find $config['sess_save_path'] and replace it with :

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