pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedError"Unable to connect to PostgresSQL server: connectDBStart()"
4+ messages / 3 participants
[nested] [flat]
* Error"Unable to connect to PostgresSQL server: connectDBStart()"
@ 2002-09-09 11:21 arun kv <arun@library.iisc.ernet.in>
0 siblings, 2 replies; 4+ messages in thread
From: arun kv @ 2002-09-09 11:21 UTC (permalink / raw)
To: pgsql-php
hello,
I am using PHP to connect to postgresql server. Till now it was
working fine and PHP was connecting sql server without any problems.
Suddenly today i am getting an error or warning which says
'Warning:
Unable to connect to PostgresSQL server: connectDBStart() -- unknown
hostname: localhost in /var/www/html/phpfiles/others/othersbrowse.php on
line 20
Warning: Supplied argument is not a valid PostgreSQL link
resource in /var/www/html/phpfiles/others/othersbrowse.php on line 25
ERROR IN
EXECUTION'
I am not getting what the problem was. Beform some times it used to come
but when i restarted the system it used to work fine.
Pls anybody tell me what the problem is and any suggestions pls since the
server has to run all the 24 hours and 365 days.
thanks in advance
Arun
^ permalink raw reply [nested|flat] 4+ messages in thread
* Error"Unable to connect to PostgresSQL server: connectDBStart()"
@ 2002-09-09 11:37 arun kv <arun@library.iisc.ernet.in>
parent: arun kv <arun@library.iisc.ernet.in>
1 sibling, 1 reply; 4+ messages in thread
From: arun kv @ 2002-09-09 11:37 UTC (permalink / raw)
To: pgsql-php
hello,
I am using PHP to connect to postgresql server. Till now it was
working fine and PHP was connecting sql server without any problems.
Suddenly today i am getting an error or warning which says
'Warning:
Unable to connect to PostgresSQL server: connectDBStart() -- unknown
hostname: localhost in /var/www/html/phpfiles/others/othersbrowse.php on
line 20
Warning: Supplied argument is not a valid PostgreSQL link
resource in /var/www/html/phpfiles/others/othersbrowse.php on line 25
ERROR IN
EXECUTION'
I am not getting what the problem was. Beform some times it used to come
but when i restarted the system it used to work fine.
Pls anybody tell me what the problem is and any suggestions pls since the
server has to run all the 24 hours and 365 days.
thanks in advance
Arun
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Error"Unable to connect to PostgresSQL server: connectDBStart()"
@ 2002-09-09 14:46 Chadwick Rolfs <cmr@shell.gis.net>
parent: arun kv <arun@library.iisc.ernet.in>
1 sibling, 0 replies; 4+ messages in thread
From: Chadwick Rolfs @ 2002-09-09 14:46 UTC (permalink / raw)
To: arun kv <arun@library.iisc.ernet.in>; +Cc: pgsql-php
How about checking that localhost is defined in /etc/hosts here's mine:
127.0.0.1 ssbeagle localhost
it also may be that pg_hba.conf doesn't have a localhost entry. Could you
post the pertinent lines of /var/www/html/phpfile/other/orthersbrowse.php?
If it's not too big, post it all. Then maybe you could let us know what
pg_hba.conf accepts for local connections see:
http://postgresql.crimelabs.net/users-lounge/docs/7.1/postgres/client-authentication.html
Another option, if this is all local (it looks like it is) is to take out
the hostname part of the pg_connect("") string. Username database, and
maybe even password (if you set it up) may be all you need anyway.
Hope this helps!
On Mon, 9 Sep 2002, arun kv wrote:
> hello,
> I am using PHP to connect to postgresql server. Till now it was
> working fine and PHP was connecting sql server without any problems.
> Suddenly today i am getting an error or warning which says
> 'Warning:
> Unable to connect to PostgresSQL server: connectDBStart() -- unknown
> hostname: localhost in /var/www/html/phpfiles/others/othersbrowse.php on
> line 20
> Warning: Supplied argument is not a valid PostgreSQL link
> resource in /var/www/html/phpfiles/others/othersbrowse.php on line 25
> ERROR IN
> EXECUTION'
>
>
> I am not getting what the problem was. Beform some times it used to come
> but when i restarted the system it used to work fine.
> Pls anybody tell me what the problem is and any suggestions pls since the
> server has to run all the 24 hours and 365 days.
> thanks in advance
> Arun
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>
-Chadwick
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Error"Unable to connect to PostgresSQL server: connectDBStart()"
@ 2002-09-09 15:46 David C. Brown <dbrown@centennialwines.com>
parent: arun kv <arun@library.iisc.ernet.in>
0 siblings, 0 replies; 4+ messages in thread
From: David C. Brown @ 2002-09-09 15:46 UTC (permalink / raw)
To: arun kv <arun@library.iisc.ernet.in>; +Cc: pgsql-php
It says it cannot resolve "localhost" Do you have it defined in your
/etc/hosts file (or c:\windows\hosts)?
Once it fails to resolve localhost it cannot create a connection to the
database which in turn is the next operation on that connection (that
you didn't create) fails with the second error message.
Dave
arun kv wrote:
>
> hello,
> I am using PHP to connect to postgresql server. Till now it was
> working fine and PHP was connecting sql server without any problems.
> Suddenly today i am getting an error or warning which says
> 'Warning:
> Unable to connect to PostgresSQL server: connectDBStart() -- unknown
> hostname: localhost in /var/www/html/phpfiles/others/othersbrowse.php on
> line 20
> Warning: Supplied argument is not a valid PostgreSQL link
> resource in /var/www/html/phpfiles/others/othersbrowse.php on line 25
> ERROR IN
> EXECUTION'
>
>
> I am not getting what the problem was. Beform some times it used to come
> but when i restarted the system it used to work fine.
> Pls anybody tell me what the problem is and any suggestions pls since the
> server has to run all the 24 hours and 365 days.
> thanks in advance
> Arun
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
>http://archives.postgresql.org
>
>
>
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-09-09 15:46 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-09-09 11:21 Error"Unable to connect to PostgresSQL server: connectDBStart()" arun kv <arun@library.iisc.ernet.in>
2002-09-09 11:37 ` arun kv <arun@library.iisc.ernet.in>
2002-09-09 15:46 ` David C. Brown <dbrown@centennialwines.com>
2002-09-09 14:46 ` Chadwick Rolfs <cmr@shell.gis.net>
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