简体   繁体   English

CodeIgniter 数据库会话错误

[英]CodeIgniter Database Session Error

When I try to execute any controller of my CodeIgniter project i receive this error:当我尝试执行我的 CodeIgniter 项目的任何控制器时,我收到此错误:

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.我试图替换 CodeIgniter 系统文件,但没有用。 The problem appears in all projects问题出现在所有项目中

Problem solved by restarting Apache.问题通过重启Apache解决。

I attach the url which saved me: http://forum.codeigniter.com/thread-64763.html我附上了拯救我的网址: http : //forum.codeigniter.com/thread-64763.html

In my case i did the following在我的情况下,我做了以下

Restart apache重启apache

That's it!就是这样!

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下载新的 codeigniter 并提取文件
  2. copy system files from fresh codeigniter into your project and overwrite the whole system folder.将系统文件从新的 codeigniter 复制到您的项目中并覆盖整个系统文件夹。

This should fix your problem.这应该可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM