From: Brian Fehrle <brianf@consistentstate.com>
To: pgsql-php@postgresql.org
Subject: Re: Connecting PHP-based Application to Postgres-9.0.3
Date: Thu, 07 Apr 2011 12:58:26 -0600
Message-ID: <4D9E0952.4080803@consistentstate.com> (raw)
In-Reply-To: <alpine.LNX.2.00.1104071116030.397@salmo.appl-ecosys.com>
References: <alpine.LNX.2.00.1104070900530.397@salmo.appl-ecosys.com>
<201104070920.37258@hal.medialogik.com>
<alpine.LNX.2.00.1104070933460.397@salmo.appl-ecosys.com>
<20110407125635.1ae13751.wmoran@potentialtech.com>
<alpine.LNX.2.00.1104071014420.397@salmo.appl-ecosys.com>
<20110407132029.be595363.wmoran@potentialtech.com>
<alpine.LNX.2.00.1104071034090.397@salmo.appl-ecosys.com>
<4D9DFAB2.2080902@consistentstate.com>
<alpine.LNX.2.00.1104071116030.397@salmo.appl-ecosys.com>
If nothing is appearing in the log after a restart and new connection
attempts, that makes me think that the database isn't even receiving the
connection attempt, which would mean either wrong connection credentials
or something blocking it in between (since it looks like it's an app on
the same machine as the database, that's most likely not it.
I'd verify that the full connection string is correct, host, port, user,
and database name. Connect with psql like you did before, but specify
all the parameters:
psql -h localhost -p <port> -U <user> <database name>
and if it works, make sure it's the same information in the
configuration for your application.
Also, this may help:
http://forum.cmsmadesimple.org/viewtopic.php?t=53350&p=251336 as it
mentions something about changing postgres7 to just postgres in the
config.php file.
- Brian F
Consistent State
On 04/07/2011 12:17 PM, Rich Shepard wrote:
> On Thu, 7 Apr 2011, Brian Fehrle wrote:
>
>> In the postgresql.conf file, look for these parameters.
>>
>> log_destination (can be set to stderr, csvlog, syslog, and eventlog,
>> you probably want syslog).
>> log_connections (default is off, turn this on to see all connection
>> attempts to the database)
>> log_disconnections (same as log_connections)
>
> Brian,
>
> Hmm-m-m.
>
> log_destination = 'syslog' # Valid values are
> combinations of
> # stderr, csvlog, syslog, and
> eventlog,
> # depending on platform. csvlog
> # requires logging_collector
> to be on.
> log_connections = on
> log_disconnections = on
>
> Yet, there's noting in /var/log/messages after restarting postgres.
>
> Apr 7 11:13:14 salmo postgres[6652]: [1-1] LOG: database system is
> ready
> to accept connections
> Apr 7 11:13:14 salmo postgres[6656]: [1-1] LOG: autovacuum launcher
> started
>
> Rich
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-php@postgresql.org
Cc: brianf@consistentstate.com
Subject: Re: Connecting PHP-based Application to Postgres-9.0.3
In-Reply-To: <4D9E0952.4080803@consistentstate.com>
References: <alpine.LNX.2.00.1104070900530.397@salmo.appl-ecosys.com> <201104070920.37258@hal.medialogik.com> <alpine.LNX.2.00.1104070933460.397@salmo.appl-ecosys.com> <20110407125635.1ae13751.wmoran@potentialtech.com> <alpine.LNX.2.00.1104071014420.397@salmo.appl-ecosys.com> <20110407132029.be595363.wmoran@potentialtech.com> <alpine.LNX.2.00.1104071034090.397@salmo.appl-ecosys.com> <4D9DFAB2.2080902@consistentstate.com> <alpine.LNX.2.00.1104071116030.397@salmo.appl-ecosys.com> <4D9E0952.4080803@consistentstate.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox