user4005632
user4005632

Reputation:

PDOException could not found driver (SQLite)

I checked php_pdo_sqlite.dll,php_sqlite3.dll exist in C:\xampp\php\ext folder and these lines is php.ini file:

extension=php_pdo_sqlite.dll 
extension=php_sqlite3.dll

here is pdo_sqlite section in phpinfo()

 pdo_sqlite

    PDO Driver for SQLite 3.x   enabled
    SQLite Library  3.8.4.3

 PDO

PDO support enabled
PDO drivers mysql, sqlite

and here PDO connection statement:

 try
        {
            $this->dbh = new PDO("C:/xampp/htdocs/WP/webfilterdb.db");//exception
            $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->resultBool=true;
        }
        catch (PDOException $e) {
            $this->resultBool=false;
            $this->resultString=$e->getMessage();
        }

Exp msg:

PDOException: could not find driver in C:\xampp\htdocs\WP\DbOperations\Connection.php5

I searched much but cant recognize missing

Upvotes: 0

Views: 1842

Answers (1)

user4790427
user4790427

Reputation:

Your connect code in not true try this

  $this->dbh = new PDO("sqlite:webfilterdb.db");

Upvotes: 2

Related Questions