-1

Hi i am trying to connect Postgresql with Apache 24.apache 24 for localhost runs on my webpage,but when i try to connect to the database it gives me this error.

Datasource class Postgres could not be found.

class DATABASE_CONFIG {

public $default = array(
    'datasource' => 'Database/Postgres',
    'persistent' => false,
    'host' => 'localhost:81',
    'login' => 'postgres',
    'password' => '786323',
    'database' => 'Blog',
    'schema' => 'public',
    'prefix' => '',
    'encoding' => 'utf8',
);

what m i doing wrong???

Esti
  • 3,677
  • 8
  • 35
  • 57

2 Answers2

0

Check that your php has the pgsql pdo driver extension and that it is loaded.

floriank
  • 25,546
  • 9
  • 42
  • 66
-1

The question was not clear.

But you can refer this website:

http://www.connectionstrings.com/postgresql

I think

'datasource' => 'Database/Postgres', 

should be

'data source' => 'Database/Postgres',