Page 1 of 1

Postgresql port configuration

Posted: Wed Jan 16, 2008 7:17 pm
by samehm
Hello,

I am trying to get s9y to connect to Postgresql on a port other than 5432, but when I try and enter, for example, "localhost:5433" in the database settings, I get the following error:

Warning: pg_connect() [function.pg-connect]: Unable to connect to PostgreSQL server: could not translate host name "localhost:5433" to address: Name or service not known in /var/www/s9y/include/db/postgres.inc.php on line 64
serendipity error: unable to connect to database - exiting.

Is there any other way of doing this?

Thanks a lot!

Re: Postgresql port configuration

Posted: Thu Jan 17, 2008 2:57 pm
by garvinhicking
Hi!

For postgresql, sadly this is currently not supported. You would need to patch the file include/db/postgres.inc.php to add the 'port' string to the pg_connect function.

Best regards,
Garvin

Posted: Thu Jan 17, 2008 6:35 pm
by samehm
That works for me, Thanks garvinhicking.
I hope you guys plan on adding this in the next release, and possibly a pretty 404 page too!
Great job, s9y rocks!