CodeIgniter Database Session Error

2020-02-12 06:21发布

问题:

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

回答1:

Problem solved by restarting Apache.

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



回答2:

In my case i did the following

Restart apache

That's it!



回答3:

The files in system should not be modified. My files were modified somehow and were throwing error. I resolved my problem as below.

  1. Download fresh codeigniter and extract files
  2. copy system files from fresh codeigniter into your project and overwrite the whole system folder.

This should fix your problem.