-
ferb
Junior Member
-
Posts: 14
Threads: 4
Joined: Dec 2020
Reputation:
0
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
Use XAMPP 8.0.0
Fedora 33 x86_64
Codeigniter 4 from github
-
ivantcholakov
Senior Member
-
Posts: 668
Threads: 17
Joined: Oct 2014
Reputation:
37
(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
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.
-
ferb
Junior Member
-
Posts: 14
Threads: 4
Joined: Dec 2020
Reputation:
0
(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
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
-
UmarEjaz
Newbie
-
Posts: 1
Threads: 0
Joined: Jan 2021
Reputation:
0
(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
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.
After I did these changes Now I'm getting this error when I access my public folder using "http://localhost/ci4project/public/".
404 - File Not Found
Controller method is not found: index
Means I'm unable to access the default codeigniter page which used to come while accessing public folder. Kindly help
-
kenjis
Administrator
-
Posts: 3,671
Threads: 96
Joined: Oct 2014
Reputation:
230
-
John_Betong
Super Moderator
-
Posts: 588
Threads: 52
Joined: Oct 2014
Reputation:
4
01-25-2021, 06:44 PM
(This post was last modified: 01-26-2021, 12:26 AM by John_Betong.)
@McGatner,
I have a DigitalOcean VPS with Ubuntu 20.04 installed and “sudo apt update && sudo apt upgrade” installed PHP 8.01 much to my surprise! Fortunately the small CodeIgniter 4 applications are working OK.
Please supply a link where I can download CI 4.1. I have searched and wondering if the latest GitHub download is version 4.1
Edit:
Found the GitHub Down Clone link:
git clone https://github.com/codeigniter4/CodeIgniter4.git
-
yuma2020
Juan Manuel Pedro Villalba
-
Posts: 39
Threads: 19
Joined: Mar 2019
Reputation:
0
(01-25-2021, 06:44 PM)John_Betong Wrote: @McGatner,
I have a DigitalOcean VPS with Ubuntu 20.04 installed and “sudo apt update && sudo apt upgrade” installed PHP 8.01 much to my surprise! Fortunately the small CodeIgniter 4 applications are working OK.
Please supply a link where I can download CI 4.1. I have searched and wondering if the latest GitHub download is version 4.1
Edit:
Found the GitHub Down Clone link:
git clone https://github.com/codeigniter4/CodeIgniter4.git
Hi, I have it using with laragon and with php7.2, it's going very well. Although I recommend if you work locally check one of my tools to work in a simple way.
use this: https://github.com/juanma386/desplegar
required install ubuntu in the windows and composer.
|