pro-dev-ph / codeigniter4-auth-and-user-management

A simple authentication and user management system for CodeIgniter 4
Apache License 2.0
56 stars 22 forks source link

headers already sent by #10

Closed zkanoca closed 9 months ago

zkanoca commented 12 months ago

I am trying to run the project on my computer. I get the following errors:

Deprecated: Optional parameter $body declared before required parameter $userAgent is implicitly treated as a required parameter in D:\laragon\www\pergola\system\HTTP\IncomingRequest.php on line 161

Deprecated: filter_var(): Passing null to parameter #3 ($options) of type array|int is deprecated in D:\laragon\www\pergola\system\HTTP\Request.php on line 439

Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at D:\laragon\www\pergola\app\Config\Events.php:33) in D:\laragon\www\pergola\system\Debug\Exceptions.php:164 Stack trace: #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', 'D:\laragon\www\...', 164) #1 D:\laragon\www\pergola\system\Debug\Exceptions.php(164): header('HTTP/1.1 500 In...', true, 500) #2 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #3 {main} thrown in D:\laragon\www\pergola\system\Debug\Exceptions.php on line 164

Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at D:\laragon\www\pergola\app\Config\Events.php:33) in D:\laragon\www\pergola\system\Debug\Exceptions.php:164 Stack trace: #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', 'D:\laragon\www\...', 164) #1 D:\laragon\www\pergola\system\Debug\Exceptions.php(164): header('HTTP/1.1 500 In...', true, 500) #2 D:\laragon\www\pergola\system\Debug\Exceptions.php(224): CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #3 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler() #4 {main} thrown in D:\laragon\www\pergola\system\Debug\Exceptions.php on line 164

I run this project using PHP 8.1. I still get the "fatal" errors even though tried to fix the "deprecated errors".