Page 1 of 1
Installation on non-standart port PostgreSQL
Posted: Sat Jun 17, 2006 7:06 pm
by mef
Hello, I have a PostgreSQL database, opened on port 5417 (it is regular situation with database providers).
A did not find any fields in istallation form, where I can sign this port. How I can sign it to compleet using Serendipity?
Thank you.
Posted: Sat Jun 17, 2006 9:43 pm
by jhermanns
try using :5417 after the hostname?
Posted: Sat Jun 17, 2006 10:20 pm
by mef
I just edit include/db/postgres.inc.php

Posted: Thu Jan 11, 2007 8:53 pm
by NicZak
I don't know PHP, what exactly did you change to specify a non-default port? I assume it would just be adding a port='5434' in the sprintf( line but I tried that and it didn't work, what am I missing?
Code: Select all
$serendipity['dbConn'] = $function(
sprintf(
'%sdbname=%s user=%s password=%s',
strlen($serendipity['dbHost']) ? ('host=' . $serendipity['dbHost'] . ' ') : '',
$serendipity['dbName'],
$serendipity['dbUser'],
$serendipity['dbPass']
)
);
Posted: Fri Jan 12, 2007 5:41 pm
by mef
function serendipity_db_connect() {
global $serendipity;
if (isset($serendipity['dbPersistent']) && $serendipity['dbPersistent']) {
$function = 'pg_pconnect';
} else {
$function = 'pg_connect';
}
$serendipity['dbConn'] = $function(
sprintf(
'%sdbname=%s user=%s password=%s',
strlen($serendipity['dbHost']) ? ('host=' . $serendipity['dbHost'] . ' port = 5417 ') : '',
$serendipity['dbName'],
$serendipity['dbUser'],
$serendipity['dbPass']
)
);
return $serendipity['dbConn'];
}
Posted: Fri Jan 12, 2007 6:00 pm
by NicZak
I appreciate the reply, unfortunately that didn't solve it meaning I have a bigger issue at hand. I think it may have something to do with the fact that I need to use psqld rather than psql for the command. Any thoughts on this one?