Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

7.8K
Vistas
Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with

I got this error after install a new xampp version (php8). and clone my codeigniter project.

Message: Return type of CI_Session_files_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_files_driver.php

Line Number: 132

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

For anyone else that comes across this error, I also experienced it after upgrading to PHP 8.1. The only way I could find to "fix" it was by adding #[\ReturnTypeWillChange] before the open, read, write, close, destroy and gc functions in /system/libraries/Session/drivers/Session_files_driver.php. For example:

#[\ReturnTypeWillChange]
public function open($save_path, $name)
{
...
over 4 years ago · Santiago Trujillo Denunciar

0

I experienced this error after re installing XAMPP Server. I have fixed this issue by adding

#[\ReturnTypeWillChange]

for all methods (open, read, write, close, destroy and gc) in Session_files_driver.php file. The file can find in project folder system/libaries/Session/drivers/Session_files_driver.php

#[\ReturnTypeWillChange]
public function open($save_path, $name)
{
   ...
}

#[\ReturnTypeWillChange]
public function read($session_id)
{
  ...
}

#[\ReturnTypeWillChange]
public function write($session_id, $session_data)
{
  ...
}

#[\ReturnTypeWillChange]
public function close()
{
  ...
}

#[\ReturnTypeWillChange]
public function destroy($session_id)
{
  ...
}

#[\ReturnTypeWillChange]
public function gc($maxlifetime)
{
  ...
}
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda