Configuration/settings/pg connect

From Davical
Revision as of 21:08, 10 December 2015 by Gorka (talk | contribs) (documented alternate database configuration option)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
$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 0.9.9.4 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' );

Template:AvailableFrom