Skip to content
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

Bug PHP SPARK MIGRATE #4101

Closed
hafidz06 opened this issue Jan 14, 2021 · 3 comments
Closed

Bug PHP SPARK MIGRATE #4101

hafidz06 opened this issue Jan 14, 2021 · 3 comments

Comments

@hafidz06
Copy link

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

    Backtrace:
                                            -646 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\BaseConnection.php::initialize
                                                            -1548 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\BaseConnection.php::query
                                                            -1591 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\BaseConnection.php::listTables
                                                            -945 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\MigrationRunner.php::tableExists
                                                            -193 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Database\MigrationRunner.php::ensureTable
                                                            -128 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\Commands\Database\Migrate.php::latest
                                                            -100 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\CLI\Commands.php::run
                                                            -107 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\CLI\CommandRunner.php::run
                                                            -85 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\CLI\CommandRunner.php::index
                                                            -914 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\CodeIgniter.php::_remap
                                                            -404 - D:\xampp\htdocs\login\vendor\codeigniter4\framework\system\CodeIgniter.php::runController

Context

  • OS: [e.g. Windows 7]
  • PHP version [e.g. 7.4.3]
    please help me, I have tried several times and the results are still the same
@hafidz06 hafidz06 added the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 14, 2021
@paulbalandan
Copy link
Member

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.

@MGatner
Copy link
Member

MGatner commented Jan 15, 2021

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.

@paulbalandan
Copy link
Member

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.

@paulbalandan paulbalandan removed the bug Verified issues on the current code behavior or pull requests that will fix them label Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants