lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
633 stars 206 forks source link

Error when running "php spark migrate -all" #189

Closed spitfire64 closed 4 years ago

spitfire64 commented 4 years ago

I have installed myth and I try to migrate you tables using the command "php spark migrate -all", but I get this error in my cmd:

Type: Error Message: Class 'SQLite3' not found Filename: C:\xampp\htdocs\ci4i\vendor\codeigniter4\framework\system\Database\ SQLite3\Connection.php Line Number: 89

MGatner commented 4 years ago

Sounds like you don’t have the SQLite PHP extension installed. Please review the CodeIgniter 4 server requirements.

spitfire64 commented 4 years ago

I have according to my xampp file "phpinfo.php" It says PDO Driver for SQLite 3.x: Enabled SQLite Library: 3.24.0

I am on PHP 7.3.5, Codeigniter 4.0.2 and I have installed Myth/auth today.

MGatner commented 4 years ago

Sometimes the database error occurs if a Composer installation fails. Can you verify if you install via Composer? Also make sure you are viewing phpinfo.php from the command line since PHP often runs different versions from browser and CLI, and you need spark to have access to the extension.

spitfire64 commented 4 years ago

MGatner, I have now installed SQLite and still get the following error when I run "php spark migrate -all": CodeIgniter CLI Tool - Version 4.0.2 - Server-Time: 2020-04-13 03:43:26am

Running all new migrations... An uncaught Exception was encountered

Type: Error Message: Class 'SQLite3' not found Filename: C:\xampp\htdocs\ci4i\vendor\codeigniter4\framework\system\Database\ SQLite3\Connection.php Line Number: 89

agungsugiarto: Thank you. I might try it as a Plan B.

spitfire64 commented 4 years ago

I temporarily renamed the Test folder and run "php spark migrate -all". Now I got the this message: CodeIgniter CLI Tool - Version 4.0.2 - Server-Time: 2020-04-13 03:48:18am

PHP Fatal error: Cannot declare class Myth\Auth\Commands\CreateGroup, because t he name is already in use in C:\xampp\htdocs\ci4i\vendor\myth\auth\src\Commands\ CreateGroup.php on line 49

And when I now check my db I have 16 Myth tables. Maybe they was migrated the first time I run the command and got the SQLite error. I don't know.

Anyway, time to move on.

ddoomenbsu commented 4 years ago

In php.ini uncomment the following lines does solve the issue for me.

extension=sqlite3
extension=pdo_sqlite
ghost commented 4 years ago

I myself just ran into this issue and solved it by running 2 commands

sudo apt install php7.2-sqlite sudo systemctl restart apache2

hope it helps!

youhunt commented 3 years ago

In php.ini uncomment the following lines does solve the issue for me.

extension=sqlite3
extension=pdo_sqlite

It's work for me too. Thanks a lot...

iwanharli commented 3 years ago

In php.ini uncomment the following lines does solve the issue for me.

extension=sqlite3
extension=pdo_sqlite

Its work, thanks

FOSSALGO commented 3 years ago

In php.ini uncomment the following lines does solve the issue for me.

extension=sqlite3
extension=pdo_sqlite

Thanks. its work. Terimakasih sejauh ini berhasil dengan cara sederhana

rizkyhaksono commented 2 years ago

In php.ini uncomment the following lines does solve the issue for me.

extension=sqlite3
extension=pdo_sqlite

Thanks. It work for me