I am just starting out with CakePHP, I went through the blog tutorial without any problems, but now I would like to try it with a proper DBMS like postgres. I modified the database.php file to point to the database created in my local postgres instance:
class DATABASE_CONFIG {
public $default = array(
'datasource' => 'Database/Postgres',
'persistent' => false,
'host' => 'localhost',
'port' => '5432',
'login' => 'cakephp',
'password' => 'cakephp',
'database' => 'cakephp',
'schema' => 'blog_tuto',
'prefix' => '',
);
public $test = array(
'datasource' => 'Database/Postgres',
'persistent' => false,
'host' => 'localhost',
'port' => '5432',
'login' => 'cakephp',
'password' => 'cakephp',
'database' => 'cakephp',
'schema' => 'blog_tuto',
'prefix' => '',
);
}
I have no problem connecting to this database with an SQL client, but CakePHP complains about the following message:
CakePHP is NOT able to connect to the database.
Database connection "Postgres" is missing, or could not be created.
Selected driver is not enabled
I have already verified that the postgres DboSource class is present. Also installed php postgres module:
$ php -m | grep pg
pdo_pgsql
pgsql
What am I missing? Thanks.
Update I : The phpinfo output associated with Postgres goes below:
pdo_pgsql
PDO Driver for PostgreSQL enabled
PostgreSQL(libpq) Version 9.1.9
Module version 1.0.2
Revision $Id: pdo_pgsql.c 321634 2012-01-01 13:15:04Z felipe $
pgsql
PostgreSQL Support enabled
PostgreSQL(libpq) Version 9.1.9
Multibyte character support enabled
SSL support enabled
Active Persistent Links 0
Active Links 0
Directive Local Value Master Value
pgsql.allow_persistent On On
pgsql.auto_reset_persistent Off Off
pgsql.ignore_notice Off Off
pgsql.log_notice Off Off
pgsql.max_links Unlimited Unlimited
pgsql.max_persistent Unlimited Unlimited
II. , Ajir, : " ", - , CakePHP . Postgres 9.3 ; , , SQL script, .
, , , Postgres 9.1.