CodeIgniter Forums

Full Version: Environment handling not working for me
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
1. I downloaded the latest version of CI4 from github.
2. Extract to website root and set DocumentRoot to public sub-folder
3. In .env file set CI_ENVIRONMENT = development
4. Create a sub-folder as development inside application/Config, and copy config files to this folder.
5. In application/Config/development/App.php set base $baseURL

Then I open my website in a browser, I get the following error:
Fatal error: Uncaught CodeIgniter\Exceptions\FrameworkException: You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file. in ... /system/Exceptions/FrameworkException.php on line 15

Have I screwed up wrong something or is it a bug?
Environment handling is handled differently in CI4 than in previous versions. This is an effort to make it more secure so that no settings are stored in your repos. Details on the new handling can be found in the new User Guide.
Steps 4 and 5 are wrong. See the user's guide.