Connection Progress database by PHP (Laravel framework), PDO


I need to connect to a Progress database via php I'm using the laravel 5.2 framework but the same documentation supports only the MySQL, Postgres, SQLite and SQL Server databases.

Searching I found very little about how to connect to this DB through PHP one of the few things I found was about connecting through the PDO so I made the code below.

    $dsn = ';dbname=minhabase;port=99999DataSource:minhadatasource;';
    $user = 'usuario';
    $password = 'minhasenha';

    $pdo = new \PDO($dsn, $user, $password);

Change php.ini (enable Pdo_odbc)


With the code above the following error appears PDOException in PaginasController.php line 36:

SQLSTATE [IM002] SQLDriverConnect: 0 [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified

Does anyone have any tips on how to solve it? or someone has already made connection to this db through php

asked by anonymous 24.06.2016 / 16:04

1 answer


As you said you have already chosen standard database like Postgres SQL

'Default' => 'pgsql',

You need to uncomment the lines that call the pdo and postgres extensions in your php (php.ini)

That is, you need to uncomment the following lines in your php.ini

Extension =
Extension =


Do not forget to stop and start your apache after doing this changes.

14.05.2017 / 01:12