Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeIgniter Database Session Error

When I try to execute any controller of my CodeIgniter project i receive this error:

Fatal error: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read) in D:\Git\crud-farm\system\libraries\Session\drivers\Session_files_driver.php on line 49
A PHP Error was encountered

Severity: Error

Message: Class CI_Session_files_driver contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (SessionHandlerInterface::read)

Filename: drivers/Session_files_driver.php

Line Number: 49

Backtrace:

I tried to replace CodeIgniter system files but it didn't work. The problem appears in all projects

like image 989
50l3r Avatar asked Mar 24 '16 20:03

50l3r


People also ask

How can store session in database in CodeIgniter?

CREATE TABLE IF NOT EXISTS `ci_sessions` ( session_id varchar(40) DEFAULT '0' NOT NULL, ip_address varchar(16) DEFAULT '0' NOT NULL, user_agent varchar(50) NOT NULL, last_activity int(10) unsigned DEFAULT 0 NOT NULL, user_data text DEFAULT '' NOT NULL, PRIMARY KEY (session_id) );

How check session is set in CodeIgniter?

3 Answers. Show activity on this post. $this->session->set_userdata('some_name', 'some_value'); But before that ensure that you have the session library included.


1 Answers

Problem solved by restarting Apache.

I attach the url which saved me: http://forum.codeigniter.com/thread-64763.html

like image 132
50l3r Avatar answered Oct 04 '22 00:10

50l3r