A database error has occurred: could not find driver (Postgresql and MySQL)

  • Application Version - OJS Version 3.3.0.5
    Debian 10.9

With PHP 7.3.27-1~deb10u1
Postgresql server 9.6
Apache Server version: Apache/2.4.38 (Debian) Server built: 2020-08-25T20:08:29

Pre-Installation Steps

  1. The following files and directories (and their contents) must be made writable:
  • config.inc.php is writable (optional): Yes

  • public/ is writable: Yes

  • cache/ is writable: Yes

  • cache/t_cache/ is writable: Yes

  • cache/t_compile/ is writable: Yes

  • cache/_db is writable: Yes

  • Description of issue

In the main page https://MYSERVER/index.php/index/install/install
After all parameters set

Errors occurred during installation
A database error has occurred: could not find driver (SQL: create table “announcement_types” (“type_id” bigserial primary key not null, “assoc_type” smallint not null, “assoc_id” bigint not null))

  • Steps you took leading up to the issue:
    Installed and created DB, user and grant privileges (in both MySQL and PostgreSQL)

  • What you tried to resolve the issue
    Installation

  • Screenshots
    Screenshot_20210425_130504

  • Error log messages if applicable
    Errors occurred during installation
    A database error has occurred: could not find driver (SQL: create table “announcement_types” (“type_id” bigserial primary key not null, “assoc_type” smallint not null, “assoc_id” bigint not null))

Hi @cederik,

Please ensure that you have created a database first, before installation, and credentials are correct. Let me know if it doesn’t help

Hi, Vitaliy
In both cases, MySQL and PostgreSQL, I have created the Data Base as well the user and privileges granted. I tested the access and table creation “by hand” before launching the Install process from the OJS installation page.
The result was the reported.

Hi PKP support

I just solve the issue.
Not only the DB is required also the PHP related extension need to be installed and properly configured.

My mistake. I hope this will help other people in order to avoid newbie-quiestion

Regards!

1 Like

Glad to hear that it’s solved. Usually, the PHP package is shipped with those but it depends on the source.