-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database cannot be autoload #8
Comments
Seeing the exact same thing on CI3. It looks like the database helper will be loaded before the .env files are processed which causes any env() calls in the database.php to fail. |
In system\core\Loader.php, they prioritize loading of the database before any other libraries:
If you don't mind touching the Code Igniter code, you can workaround this issue by forcing env to be loaded before database like:
|
Thanks for the guide :) |
Thanks @anthony-n-brown it works :) |
When I added to database in to autoload file. Dot env is not working. How can I solve that?
The text was updated successfully, but these errors were encountered: