CI4 cannot start session |
I add a line in Base Controller and run session.
PHP Code: <?php namespace App\Controllers; When I run my page, it show this massage : Quote:Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at C:\Users\hoffm\Dropbox\anaso\app\Config\Events.php:27) in C:\Users\hoffm\Dropbox\anaso\system\Debug\Exceptions.php:162 Stack trace: #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', 'C:\\Users\\hoffm\\...', 162, Array) #1 C:\Users\hoffm\Dropbox\anaso\system\Debug\Exceptions.php(162): header('HTTP/1.1 500 In...', true, 500) #2 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #3 {main} thrown in C:\Users\hoffm\Dropbox\anaso\system\Debug\Exceptions.php on line 162 Do you have any suggestion for me ? please ~
It's telling you that you have already sent something to the screen.
Check your code for output to the screen. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(05-13-2020, 03:17 AM)InsiteFX Wrote: It's telling you that you have already sent something to the screen. Thank you for your reply. I tried to download a new CI4, and start session in Base Controller directly. But the result is same the problem too. So, I think it is my code problem.
Just look in your code where you are out putting to the view.
Also make sure you are not using the BOM and there are no spaces after the php tag. And no ending php tag. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |