Closed hafidz06 closed 3 years ago
Set the $threshold
property of app/Config/Logger.php
to 4
so DB errors can also be logged. Run php spark migrate -all
again and kindly look at your logs at writable/logs/
. Tell us the error posted.
In the past this has usually been caused by missing extensions for php-cli
. Run php -I
and make sure you meet the server requirements, then follow Paul's troubleshooting steps above.
More often than not, this is not a framework issue but a misconfiguration in the development/production server, like missing php extensions and wrong configs. Closing this, but continue the conversation if you have new info available.
D:\xampp\htdocs\login>php spark migrate -all
CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2021-01-14 08:45:46am
Running all new migrations... An uncaught Exception was encountered
Type: CodeIgniter\Database\Exceptions\DatabaseException Message: Unable to connect to the database. Filename: D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\BaseConnection.php Line Number: 425
Context