Configuration/settings/pg connect

From Davical
Jump to navigationJump to search
$c->pg_connect[] = 'dbname=davical user=davical_app port=5433 host=somehost password=mypass';

Default: none

The application will attempt to connect to the database, successively applying connection parameters from the array in $c->pg_connect. This mandatory setting is used by both, the web interface but also the CALDAV server. If no host is specified, "localhost" is assumed.

Note: From version there is an alternate syntax available (though pg_connect will continue to work) which is:

 $c->db_connect[] = array( 'dsn' => 'pgsql:dbname=davical port=5432 host=dbhost', 'dbuser' => 'davical_app', 'dbpass' => 'fred' );

Or, for a local DB on the default port with trustauthentication:

 $c->db_connect[] = array( 'dsn' => 'pgsql:dbname=davical', 'dbuser' => 'davical_app' );

Available from DAViCal version: All versions and later