Welcome Guest, Not a member yet? Register   Sign In
ini_set(): Session ini settings cannot be changed after headers have already been sen
#1

in php 8.0.9 everything works
but in php 8.2 
i get this error any one have idea to solve?

Error : ini_set():Session ini settings cannot be changed after headers have already been sent
Reply
#2

Set in App/Common.php or .htaccess file
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#3

[quote pid="412019" dateline="1692777665"]
what do i set in that file?
[/quote]
Reply
#4

Replace ini_set() from error line to file
Simple CI 4 project for beginners codeigniter-expenses ( topic )
Reply
#5

Deprecated: Creation of dynamic property Config\Exceptions::$logDeprecations is deprecated in C:\xampp\htdocs\gpms2\vendor\codeigniter4\framework\system\Debug\Exceptions.php on line 96

Deprecated: Creation of dynamic property Config\Exceptions::$deprecationLogLevel is deprecated in C:\xampp\htdocs\gpms2\vendor\codeigniter4\framework\system\Debug\Exceptions.php on line 97
ErrorException
ini_set(): Session ini settings cannot be changed after headers have already been sent

i still have this error can anyonen help please
Reply
#6

I am also receiving that error after updating PHP.
ini_set(): Session ini settings cannot be changed after headers have already been sent.
SYSTEMPATH/Session/Handlers/FileHandler.php at line 74
The whole backtrace is CI code. Not sure what I'm doing wrong and how it went from working to not working. Can anyone point me in the right direction?
Reply
#7

Check your ini settings if session is set to auto start. Disable that.
Reply
#8

(This post was last modified: 06-03-2025, 06:27 AM by gosocial2. Edit Reason: clarified )

The same happened to me causing me to forcibly switch to PHP 8.3 which resolved the issue (even no such issue on 8.3.0) FYI.

CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5)

Reply




Theme © iAndrew 2016 - Forum software by © MyBB