• 3 Vote(s) - 3.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter 4 Playground

#27
(11-29-2019, 05:14 AM)MGatner Wrote: @John_Betong in your first example it’s a straight MySQL credentials issue. Make sure you can connect to the database from the command line with whatever credentials you are using before trying it in CI4.

In the second example it looks like you didn’t remove the “database” line from .env when you set it in the config files, so even though you are using MySQL it is still looking for the database named for SQLite. Try removing that from .env and running again.
Many thanks that got me over that hurdle Smile

I removed .env and also had to add the following:
PHP Code:
./app/Config/Database.php -> public $default = [
...
  'database' 'ci4',
...
]; 

Next hurdle with setting the following in index.php:
PHP Code:
# John
  define('CI_DEBUG'TRUE); 
  $_SERVER['CI_ENVIRONMENT'] = 'development'
Welcome_message appeared OK but  the following errors were logged:
PHP Code:
CRITICAL 2019-11-29 08:21:23 --> Undefined propertyConfig\App::$CSRFHeaderName
#0 /var/www/ci2/CodeIgniter4/system/Security/Security.php(184): CodeIgniter\Debug\Exceptions->errorHandler(8, 'Undefined prope...', '/var/www/ci2/Co...', 184, Array)
#1 /var/www/ci2/CodeIgniter4/system/Config/Services.php(738): CodeIgniter\Security\Security->__construct(Object(Config\App))
#2 /var/www/ci2/CodeIgniter4/system/Config/BaseService.php(120): CodeIgniter\Config\Services::security(Object(Config\App), false)
#3 /var/www/ci2/CodeIgniter4/system/Config/Services.php(730): CodeIgniter\Config\BaseService::getSharedInstance('security', NULL)
#4 /var/www/ci2/CodeIgniter4/system/Helpers/security_helper.php(59): CodeIgniter\Config\Services::security()
#5 /var/www/ci2/CodeIgniter4/system/Debug/Toolbar.php(448): sanitize_filename('debugbar_157503...')
#6 /var/www/ci2/playground/app/Config/Events.php(41): CodeIgniter\Debug\Toolbar->respond()
#7 [internal function]: CodeIgniter\Events\Events::Config\{closure}()
#8 /var/www/ci2/CodeIgniter4/system/Events/Events.php(188): call_user_func(Object(Closure))
#9 /var/www/ci2/CodeIgniter4/system/CodeIgniter.php(227): CodeIgniter\Events\Events::trigger('pre_system')
#10 /var/www/ci2/playground/public/index.php(54): CodeIgniter\CodeIgniter->run()
#11 {main} 

These errors were generated when using my modified ci4-strict.tk/system files:
PHP Code:
CRITICAL 2019-11-29 08:26:58 --> Undefined propertyConfig\App::$CSRFHeaderName
#0 /var/www/ci4-strict.tk/system/Security/Security.php(185): CodeIgniter\Debug\Exceptions->errorHandler(8, 'Undefined prope...', '/var/www/ci4-st...', 185, Array)
#1 /var/www/ci4-strict.tk/system/Config/Services.php(739): CodeIgniter\Security\Security->__construct(Object(Config\App))
#2 /var/www/ci4-strict.tk/system/Config/BaseService.php(121): CodeIgniter\Config\Services::security(Object(Config\App), false)
#3 /var/www/ci4-strict.tk/system/Config/Services.php(731): CodeIgniter\Config\BaseService::getSharedInstance('security', NULL)
#4 /var/www/ci4-strict.tk/system/Helpers/security_helper.php(60): CodeIgniter\Config\Services::security()
#5 /var/www/ci4-strict.tk/system/Debug/Toolbar.php(449): sanitize_filename('debugbar_157503...')
#6 /var/www/ci2/playground/app/Config/Events.php(41): CodeIgniter\Debug\Toolbar->respond()
#7 [internal function]: CodeIgniter\Events\Events::Config\{closure}()
#8 /var/www/ci4-strict.tk/system/Events/Events.php(189): call_user_func(Object(Closure))
#9 /var/www/ci4-strict.tk/system/CodeIgniter.php(228): CodeIgniter\Events\Events::trigger('pre_system')
#10 /var/www/ci2/playground/public/index.php(54): CodeIgniter\CodeIgniter->run()
#11 {main} 

Please let me know if there is any further information required.
download and make your system directory strict
Reply


Messages In This Thread
CodeIgniter 4 Playground - by jlp - 11-25-2019, 09:53 AM
RE: CodeIgniter 4 Playground - by MGatner - 11-25-2019, 10:54 AM
RE: CodeIgniter 4 Playground - by salahAit - 11-25-2019, 12:44 PM
RE: CodeIgniter 4 Playground - by Poetawd - 11-25-2019, 03:55 PM
RE: CodeIgniter 4 Playground - by Avega Soft - 11-25-2019, 05:56 PM
RE: CodeIgniter 4 Playground - by msjagan - 11-25-2019, 08:51 PM
RE: CodeIgniter 4 Playground - by php_rocs - 11-25-2019, 09:02 PM
RE: CodeIgniter 4 Playground - by Bessalitskykh - 11-26-2019, 07:43 AM
RE: CodeIgniter 4 Playground - by trollfalgar - 11-26-2019, 09:10 AM
RE: CodeIgniter 4 Playground - by InsiteFX - 11-27-2019, 04:30 AM
RE: CodeIgniter 4 Playground - by muuucho - 11-27-2019, 07:15 AM
RE: CodeIgniter 4 Playground - by MGatner - 11-27-2019, 07:50 AM
RE: CodeIgniter 4 Playground - by jasonzig - 11-27-2019, 11:00 AM
RE: CodeIgniter 4 Playground - by Poetawd - 11-27-2019, 08:11 PM
RE: CodeIgniter 4 Playground - by MGatner - 11-27-2019, 11:19 AM
RE: CodeIgniter 4 Playground - by Digital_Wolf - 11-27-2019, 12:58 PM
RE: CodeIgniter 4 Playground - by includebeer - 11-27-2019, 06:31 PM
RE: CodeIgniter 4 Playground - by jasonzig - 11-27-2019, 07:44 PM
RE: CodeIgniter 4 Playground - by adelbak - 11-27-2019, 06:36 PM
RE: CodeIgniter 4 Playground - by John_Betong - 11-27-2019, 08:06 PM
RE: CodeIgniter 4 Playground - by jasonzig - 11-27-2019, 08:13 PM
RE: CodeIgniter 4 Playground - by John_Betong - 11-28-2019, 09:26 PM
RE: CodeIgniter 4 Playground - by jasonzig - 11-27-2019, 08:11 PM
RE: CodeIgniter 4 Playground - by jimpannell - 11-28-2019, 05:53 AM
RE: CodeIgniter 4 Playground - by MGatner - 11-28-2019, 05:57 AM
RE: CodeIgniter 4 Playground - by MGatner - 11-29-2019, 05:14 AM
RE: CodeIgniter 4 Playground - by John_Betong - 11-29-2019, 07:30 AM
RE: CodeIgniter 4 Playground - by MGatner - 11-29-2019, 07:34 AM
RE: CodeIgniter 4 Playground - by triluminos - 12-01-2019, 12:04 AM
RE: CodeIgniter 4 Playground - by MGatner - 12-01-2019, 12:50 PM
RE: CodeIgniter 4 Playground - by miiscan - 12-01-2019, 03:46 PM
RE: CodeIgniter 4 Playground - by hainm - 12-01-2019, 09:16 PM
RE: CodeIgniter 4 Playground - by triluminos - 12-02-2019, 10:39 PM
RE: CodeIgniter 4 Playground - by John_Betong - 12-02-2019, 08:37 AM
RE: CodeIgniter 4 Playground - by MGatner - 12-03-2019, 04:39 AM
RE: CodeIgniter 4 Playground - by muuucho - 12-07-2019, 04:52 AM
RE: CodeIgniter 4 Playground - by John_Betong - 12-05-2019, 06:07 AM
RE: CodeIgniter 4 Playground - by kilishan - 12-05-2019, 07:31 AM
RE: CodeIgniter 4 Playground - by InsiteFX - 12-07-2019, 07:44 AM
RE: CodeIgniter 4 Playground - by muuucho - 12-08-2019, 10:59 AM
RE: CodeIgniter 4 Playground - by ankurjain.me - 12-20-2019, 12:50 AM
RE: CodeIgniter 4 Playground - by muuucho - 12-09-2019, 07:08 AM
RE: CodeIgniter 4 Playground - by John_Betong - 12-09-2019, 07:22 AM
RE: CodeIgniter 4 Playground - by muuucho - 12-09-2019, 08:32 AM
RE: CodeIgniter 4 Playground - by John_Betong - 12-09-2019, 08:40 AM
RE: CodeIgniter 4 Playground - by muuucho - 12-09-2019, 09:17 AM
RE: CodeIgniter 4 Playground - by MGatner - 12-09-2019, 09:29 AM
RE: CodeIgniter 4 Playground - by Wouter60 - 12-24-2019, 07:06 AM
RE: CodeIgniter 4 Playground - by MGatner - 12-24-2019, 07:43 AM
RE: CodeIgniter 4 Playground - by John_Betong - 12-24-2019, 08:33 AM
RE: CodeIgniter 4 Playground - by rhubka - 12-29-2019, 03:24 PM
RE: CodeIgniter 4 Playground - by John_Betong - 01-02-2020, 05:16 AM
RE: CodeIgniter 4 Playground - by muuucho - 01-02-2020, 05:33 AM
RE: CodeIgniter 4 Playground - by tapan29bd - 01-02-2020, 02:28 AM
RE: CodeIgniter 4 Playground - by abrkof - 01-04-2020, 09:56 AM
RE: CodeIgniter 4 Playground - by jasonzig - 01-24-2020, 02:10 PM
RE: CodeIgniter 4 Playground - by kilishan - 01-24-2020, 02:39 PM
RE: CodeIgniter 4 Playground - by Bessalitskykh - 01-27-2020, 03:33 AM
RE: CodeIgniter 4 Playground - by edwardbailey - 01-31-2020, 05:56 AM
RE: CodeIgniter 4 Playground - by kyleojay - 02-07-2020, 04:08 AM
RE: CodeIgniter 4 Playground - by manishareddy333 - 02-12-2020, 02:49 AM
RE: CodeIgniter 4 Playground - by manishareddy333 - 02-12-2020, 02:49 AM
RE: CodeIgniter 4 Playground - by manishareddy333 - 03-12-2020, 04:11 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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