Welcome Guest, Not a member yet? Register   Sign In
sqlite3 connection
#1

Hi everyone,
I can't find out what's the problem whit my sqlite3 connection
This is my configuration:

PHP Code:
    public $sqlite = [
        'DSN'    => '',
        'hostname' => 'localhost',
        'username' => '',
        'password' => '',
        'database' => APPPATH 'Database/mydb.sql3',
        'DBDriver' => 'SQLite3',
        'DBPrefix' => '',
        'pConnect' => false,
        'DBDebug'  => (ENVIRONMENT !== 'production'),
        'cacheOn'  => false,
        'cacheDir' => '',
        'charset'  => 'utf8',
        'DBCollat' => '',
        'swapPre'  => '',
        'encrypt'  => false,
        'compress' => false,
        'strictOn' => false,
        'failover' => [],
        'port'     => 3306,
    ]; 

When I run
$query = $builder->get();
I have this response:
Error
Class 'SQLite3' not found

PHP Code:
86             return (! $this->password)
87                 ? new \SQLite3($this->database)
88                 : new \SQLite3($this->databaseSQLITE3_OPEN_READWRITE SQLITE3_OPEN_CREATE$this->password);
89         

Some idea?
Thanks.

Luk
Reply
#2

SQLite3 is a PHP extension.
Find and open "php.ini", uncomment the SQLite extension, and then save it.
Restart server
Reply
#3

(This post was last modified: 07-10-2020, 12:11 AM by s4f3r.)

(03-24-2019, 12:35 PM)JoaoNinguem Wrote: SQLite3 is a PHP extension.
Find and open "php.ini", uncomment the SQLite extension, and then save it.
Restart server

--EDIT-- It worked for me.

Thanks a lot

R.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB