CodeIgniter Forums
Argument 1 passed to CodeIgniter must be an instance of Config\App, null given - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: Argument 1 passed to CodeIgniter must be an instance of Config\App, null given (/showthread.php?tid=80649)



Argument 1 passed to CodeIgniter must be an instance of Config\App, null given - kabeza - 11-26-2021

Hi guys

I'm cloning a private repository from github, which contains a CodeIgniter App
I've created a virtualhost, pointing to public folder,
Then threw composer update command, and all went fine
Then set 777 to writable/ *

When loading virtualhost's url, I'm getting the following error

Code:
Fatal error: Uncaught TypeError: Argument 1 passed to CodeIgniter\CodeIgniter::__construct() must be an instance of Config\App, null given, called in /media/ci/vendor/codeigniter4/framework/system/Config/Services.php on line 139 and defined in /media/ci/vendor/codeigniter4/framework/system/CodeIgniter.php:147 Stack trace: #0 /media/ci/vendor/codeigniter4/framework/system/Config/Services.php(139): CodeIgniter\CodeIgniter->__construct() #1 /media/ci/vendor/codeigniter4/framework/system/Config/BaseService.php(248): CodeIgniter\Config\Services::codeigniter() #2 /media/ci/vendor/codeigniter4/framework/system/Config/BaseService.php(189): CodeIgniter\Config\BaseService::__callStatic() #3 /media/ci/vendor/codeigniter4/framework/system/Config/Services.php(134): CodeIgniter\Config\BaseService::getSharedInstance() #4 /media/ci/vendor/codeig in /media/ci/vendor/codeigniter4/framework/system/CodeIgniter.php on line 147

I've php 7.4.23 running with Apache on Ubuntu 18.04

Any clues? Thanks a lot in advance


RE: Argument 1 passed to CodeIgniter must be an instance of Config\App, null given - captain-sensible - 11-26-2021

would be nice to see your virtual code, but did you chmod 777 -R writable

check inside for permissions inside writable since structure is:


Code:
directories, 689 files
[andrew@darkstar:http/andrinaPerfectBeauty.com]$ tree -L 1  writable                                                                                          (11-26 19:09)
writable
├── Art
├── Art2
├── cache
├── debugbar
├── logs
├── session
└── uploads

//forget Art Art2 thats my SQlite in my case


RE: Argument 1 passed to CodeIgniter must be an instance of Config\App, null given - kabeza - 11-26-2021

(11-26-2021, 12:10 PM)captain-sensible Wrote: would be nice to see your virtual code, but did you chmod 777 -R writable

check inside for permissions inside writable since structure is:


Code:
directories, 689 files
[andrew@darkstar:http/andrinaPerfectBeauty.com]$ tree -L 1  writable                                                                                          (11-26 19:09)
writable
├── Art
├── Art2
├── cache
├── debugbar
├── logs
├── session
└── uploads

//forget Art Art2 thats my SQlite in my case

very weird...

it was just the lack of

App/Config/App.php
App/Config/Database.php

that were added originally to .gitignore

Adding those files, made it work

Thanks


RE: Argument 1 passed to CodeIgniter must be an instance of Config\App, null given - captain-sensible - 11-27-2021

ok glad it worked out for you :^)