Postgresql port configuration

Having trouble installing serendipity?
Post Reply
samehm
Posts: 2
Joined: Wed Jan 16, 2008 7:09 pm

Postgresql port configuration

Post 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!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Postgresql port configuration

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
samehm
Posts: 2
Joined: Wed Jan 16, 2008 7:09 pm

Post 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!
Post Reply