catfan / Medoo

The lightweight PHP database framework to accelerate the development.
https://medoo.in
MIT License
4.84k stars 1.15k forks source link

Medoo can't connect to postgres server #834

Closed Danzondo closed 5 years ago

Danzondo commented 5 years ago

Describe the bug A clear and concise description of what the bug is.

Information

When using the medoo standard configuration to connect to a pgsql server I get the error: "Incorrect connection options"

When changing the same config to a mysql server it works. Also when passing a pdo object to the pdo parameter of medoo it also works to connect to the pgsql server.

The config is 100% correct, no typo or something like that.

catfan commented 5 years ago

Would you like to post your config (initialization) code here?

Danzondo commented 5 years ago

$database = new Medoo([ 'database_type' => 'PostgreSQL', 'database_name' => 'dbname', 'server' => 'localhost', 'username' => 'username', 'password' => 'password']);

catfan commented 5 years ago

The database_type should be pgsql, not PostgreSQL.

Danzondo commented 5 years ago

oh thank you, I thought I need to use the value of the left column on the PHP_PDO Extension list