• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fatal error:Default value for parameters with a class type hint can only be NULL, CI4

#1
Wink 
Today I am trying to install Codeigniter 4 but i got fatal error.

Any solutions for this error.


Fatal error: Default value for parameters with a class type hint can only be NULL in E:\wamp64\www\codeIgniter4\system\Common.php on line 142



App.php
Code:
public $baseURL = 'http://codeigniter4.local';

Code:
public $indexPage = '';


[Image: aaaaa.png]
Web Developer
Reply

#2
Are you running PHP 7+ ?

Also your base_url needs an ending / slash
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#3
(12-12-2017, 05:25 AM)InsiteFX Wrote: Are you running PHP 7+ ?

Also your base_url needs an ending / slash

I added '/' after base_url. But again same error but I am using old PHP.

Apache Version:    2.4.17
PHP Version:    5.6.16
Server Software:    Apache/2.4.17 (Win64) PHP/5.6.16 - Port defined for Apache: 80
MySQL Version:    5.7.9 - Port defined for MySQL: 3306
Web Developer
Reply

#4
PHP version 7.0.15 or newer is required, with the intl extension installed. (Documentation)
Reply

#5
You need to install PHP 7.+.+ for CodeIgniter 4 it is a requirement.
What did you Try? What did you Get? What did you Expect?

Joined the CodeIgniter Community in 2009.          ( Skype: insitfx )
Reply

#6
Thanks.
Web Developer
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.