CodeIgniter Forums
Interface "CI_Session_driver_interface" not found - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Interface "CI_Session_driver_interface" not found (/showthread.php?tid=89163)



Interface "CI_Session_driver_interface" not found - xanabobana - 01-17-2024

Hi,
After upgrading to php 8.1, we had the following message: 
Message: Return type of CI_Session_database_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice Filename: drivers/Session_database_driver.php

I tried using the  #[\ReturnTypeWillChange] attribute in system\libraries\Session\drivers\Session_database_driver.php, but it didn't help.  I tried reverting the file and got the error: 
An uncaught Exception was encountered
Type: Error
Message: Interface "CI_Session_driver_interface" not found
Filename: /users/v/m/vmc/vmcdevel/system/libraries/Session/drivers/Session_database_driver.php
Line Number: 50



Any ideas for troubleshooting?   I re-downloaded that system file but still am getting the same error.  Not sure what I did!


RE: Interface "CI_Session_driver_interface" not found - xanabobana - 01-18-2024

I re-uploaded the entire /system/libraries/ folder and that solved both issues!


RE: Interface "CI_Session_driver_interface" not found - BradleyMVasquez - 12-09-2024

Hi all,

With the issue where users encounter an error stating that the "CI_Session_driver_interface" interface cannot be found in their CodeIgniter application.

I think the error usually indicates a problem with the session driver configuration and it is important to deploy and load the session driver correctly for proper functionality.
Thanks!