KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Uncaught PDO Exception: could not find driver with PostgreSQL DB #1271

Closed ugakr opened this topic on on Jan 22, 2020 - 1 comments

ugakr commented on Jan 22, 2020
Fatal error: Uncaught PDOException: could not find driver in C:\Users\name\Documents\KoolReportsProject\koolreport\core\src\datasources\PdoDataSource.php:114

when connecting to a database with the code:

class report extends \koolreport\KoolReport{
      public function settings(){
        return array(
          "dataSources"=>array(
            "postgresqldata"=>array(
              "connectionString" => "postgresql:host=hostname;dbname=nam",
              "username" => "user",
              "password" => "pw",
              "charset" => 'utf8'
            )
          )
        );
      }

This is my first time connecting to a database as my datasource. Are any parts of my code wrong or am I missing something with installation? The respective login info is just redacted of course, I put the real working ones in there; but I wasn't sure if my connectionString variable names were right. Thanks in advance for the help.

ugakr commented on Jan 24, 2020

Added the needed extensions to my php.ini production and development files as well as switching to postgresql data source instead fixed it.

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
None yet

None