Re: [Postfixadmin-devel] database connection (not using std. port
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2009-04-28 15:17:57
|
Hello, Am Dienstag, 28. April 2009 schrieb David Goodwin: > Bird wrote: > > I do NOT use the standard port 55xx for postgresql. > > > > How can I add the selected port in confic.inc.php ? > > $CONF['port'] = 'xxxxx' > > See functions.inc.php - there is a function called 'db_connect()' > which contains something like : > $connect_string = "host=" . $CONF['database_host'] . " > dbname=" . $CONF['database_name'] . " user=" . $CONF['database_user'] > . " password=" . $CONF['database_password']; > $link = @pg_pconnect ($connect_string) or $error_text .= > http://php.net/pg_connect which will show you how you can change the > pg_pconnect line. (I suspect you just need "port=1234 " in the > $connect_string somewhere. Some small hints: - You don't need to change the functions.inc.php code. Just use something like $CONF['database_password'] = "topsecret port=1234" ;-) - You can also connect to a socket - try $CONF['database_host'] = "/path/to/the/socket" Reading tips: - php.net/pg_connect (as already suggested by David) and especially the user comments on this page - http://www.postgresql.org/docs/8.3/static/libpq-connect.html for details what you can specify in the connection string Note: This answer is based on reading the listed documentation. I did not test it myself. Regards, Christian Boltz -- Ich bin nicht stolz auf das unnoetige Icon "Arbeitsplatz" auf dem Desktop. Irgendwann sieht man nur noch per "uname -a", ob das richtige System laeuft... [Thomas Moritz in suse-linux] |