PHP 8 Session cache limiter error but not with other versions of php

Viewed 45

Since I upgraded to PHP 8, I get this error: session_start(): Session cache limiter cannot be sent after headers have already sent...

I have had this error for several months and it only appears from time to time :

  • When I am inactive for too long the site
  • When I post a form
  • When I download a video that is too heavy

What has been done :

  • I did a lot of research and it was impossible for me to find the solution.
  • The error does not appear in PHP 7.4.
  • There is no code that is placed before the session_start().
  • The session.save_path has been redefined.
  • IDE with UTF-8 without BOM.

The code :

<?php

session_start();

include 'core/Config.php';

Config::autoloader();

$template = new Template();

?>
0 Answers
Related