Welcome Guest, Not a member yet? Register   Sign In
Codeigniter 4 not workin PHP 8
#3

(12-04-2020, 10:43 PM)ivantcholakov Wrote:
(12-04-2020, 03:01 PM)ferb Wrote: I downloade development version from github, but not show this error for php on xampp 8.0.0


Code:
Deprecated: Required parameter $userAgent follows optional parameter $body in /opt/lampp/htdocs/hu/of/system/HTTP/IncomingRequest.php on line 131

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

Fatal error: Uncaught ErrorException: Cannot modify header information - headers already sent by (output started at /opt/lampp/htdocs/of/ofi/app/Config/Events.php:35) in /opt/lampp/htdocs/of/ofi/system/Debug/Exceptions.php:137 Stack trace: #0 [internal function]: CodeIgniter\Debug\Exceptions->errorHandler(2, 'Cannot modify h...', '/opt/lampp/htdo...', 137) #1 /opt/lampp/htdocs/of/ofi/system/Debug/Exceptions.php(137): header('HTTP/1.1 500 In...', true, 500) #2 /opt/lampp/htdocs/of/ofi/system/Debug/Exceptions.php(197): CodeIgniter\Debug\Exceptions->exceptionHandler(Object(ErrorException)) #3 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler() #4 {main} thrown in /opt/lampp/htdocs/of/ofi/system/Debug/Exceptions.php on line 137

Sad Sad Sad

Use XAMPP 8.0.0
Fedora 33 x86_64
Codeigniter 4 from github

Replace in this line
Code:
UserAgent $userAgent
with:
Code:
UserAgent $userAgent = null

Also, I saw a similar problem Route/RouteCollection.php file. If it is not corrected yet, replace the line
Code:
public function match(array $verbs = [], string $from, $to, array $options = null): RouteCollectionInterface
with:
Code:
public function match(array $verbs = [], string $from = null, $to = null, array $options = null): RouteCollectionInterface

Make these corrections on the system files directly, when you upgrde in the future these lines would be already fixed.


It's work, but have some errors minors, in pagers, thanks, i use this solution for wait the new version compatible wtih CI4 with PHP 8
Reply


Messages In This Thread
Codeigniter 4 not workin PHP 8 - by ferb - 12-04-2020, 03:01 PM
RE: Codeigniter 4 not workin PHP 8 - by ferb - 12-05-2020, 11:48 AM
RE: Codeigniter 4 not workin PHP 8 - by UmarEjaz - 01-24-2021, 12:21 PM
RE: Codeigniter 4 not workin PHP 8 - by kenjis - 01-25-2021, 04:00 AM
RE: Codeigniter 4 not workin PHP 8 - by MGatner - 01-25-2021, 06:09 AM
RE: Codeigniter 4 not workin PHP 8 - by yuma2020 - 01-26-2021, 11:44 PM
RE: Codeigniter 4 not workin PHP 8 - by kenjis - 01-27-2021, 03:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB