agungsugiarto / boilerplate

CodeIgniter4 Boilerplate based on AdminLTE 3 with user management, roles, permissions, ...
MIT License
156 stars 49 forks source link

No such file or directory /vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php - 225 #69

Closed gosocial2 closed 4 years ago

gosocial2 commented 4 years ago

No such file or directory ERROR Running php spark boilerplate:install ends prematurely.

To Reproduce Steps to reproduce the behavior:

  1. composer create-project codeigniter4/appstarter agungsugiartoboilerplate
  2. Follow STEP 1 of the instructions on https://github.com/agungsugiarto/boilerplate/blob/master/README.md
  3. composer require agungsugiarto/boilerplate
  4. Follow the rest of instructions (from STEP 2 to STEP 4) on https://github.com/agungsugiarto/boilerplate/blob/master/README.md
  5. php spark boilerplate:install

Terminal Output with Errors

go$ php spark boilerplate:install
CodeIgniter CLI Tool - Version 4.0.3 - Server-Time: 2020-07-15 03:37:09am

  created: Config/Boilerplate.php
  created: Database/Migrations/2020-02-03-081118_create_menu_table.php
Running all new migrations...

No such file or directory
/Applications/MAMP/htdocs/agungsugiartoboilerplate/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php - 225

No such file or directory
/Applications/MAMP/htdocs/agungsugiartoboilerplate/vendor/codeigniter4/framework/system/Database/MySQLi/Connection.php - 225
agungsugiarto commented 4 years ago

Hello, i think this because connection issue with your config. Can you verify this issue guys @InsiteFX, @AbdulRafay ?

AbdulRafay commented 4 years ago

I did not face this issue. I think error is because of missing database driver.

@gosocial2 please try running the following command

sudo apt install php7.2-pdo php7.2-mysql

NOTE: please adjust the command as per your php version

InsiteFX commented 4 years ago

You may need to edit your php.ini file and make sure that the PDO extension is not remarked out ; semi-colon in front of it.

gosocial2 commented 4 years ago

@AbdulRafay and @InsiteFX , thank you both for your replies.

PDO is already enabled in my php.ini, (I have other non-framework-based apps using it), but it is not enabled in my CI4/Boilerplate project's .env settings:

database.default.DBDriver = MySQLi

This migration issue occurred with some other CI4 projects I created, too, so I opened an issue there (https://github.com/codeigniter4/CodeIgniter4/issues/3359)

Are you guys saying that switching to PDO can be a workaround?

InsiteFX commented 4 years ago

I' am using the MySQLi driver and everything is running fine here, the only difference is that I manually installed Boilerplate. I know that Lonnie also updated the Myth/Auth a couple of days ago for the new filer parameters.

gosocial2 commented 4 years ago

I' am using the MySQLi driver and everything is running fine here, the only difference is that I manually installed Boilerplate. I know that Lonnie also updated the Myth/Auth a couple of days ago for the new filer parameters.

Can you briefly describe the manual installation step? Still require myth/auth via composer? And where to paste copied contents of Boilerplate/src/. ?

InsiteFX commented 4 years ago

I manually install Myth/Auth also.

gosocial2 commented 4 years ago

In the .env file, changing

database.default.hostname = localhost

to

database.default.hostname = 127.0.0.1

solves the issue.

You might want to update the README.MD section for INSTALLATION step 2.

Thanks for your help anyway.