pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PG_CONNECT error
8+ messages / 6 participants
[nested] [flat]

* PG_CONNECT error
@ 2004-02-02 23:29  Gustavo Paixao <postgresql@fironline.com.br>
  0 siblings, 1 reply; 8+ messages in thread

From: Gustavo Paixao @ 2004-02-02 23:29 UTC (permalink / raw)
  To: pgsql-php

Hi,

Why this error ir happening? and How to fix?

*Warning*: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
IDENT authentication failed for user "fotolis" . in 
*/home/fotolis/public_html/connection.php* on line *6

*Thanks,*


Gustavo Paixão
*

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: PG_CONNECT error
@ 2004-02-02 23:53  scott.marlowe <scott.marlowe@ihs.com>
  parent: Gustavo Paixao <postgresql@fironline.com.br>
  0 siblings, 1 reply; 8+ messages in thread

From: scott.marlowe @ 2004-02-02 23:53 UTC (permalink / raw)
  To: Gustavo Paixao <postgresql@fironline.com.br>; +Cc: pgsql-php

On Mon, 2 Feb 2004, Gustavo Paixao wrote:

> Hi,
> 
> Why this error ir happening? and How to fix?
> 
> *Warning*: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
> IDENT authentication failed for user "fotolis" . in 
> */home/fotolis/public_html/connection.php* on line *6

Is there a postgresql user named fotolis in the database?

select * from pg_user

will tell you.




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: PG_CONNECT error
@ 2004-02-03 00:25  Gustavo Paixao <postgresql@fironline.com.br>
  parent: scott.marlowe <scott.marlowe@ihs.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Gustavo Paixao @ 2004-02-03 00:25 UTC (permalink / raw)
  To: pgsql-php

fotolis is user in the database!!!

How may I edit pg_hba.conf and pg_ident.conf on prompt using bash.exe?

scott.marlowe wrote:

>On Mon, 2 Feb 2004, Gustavo Paixao wrote:
>
>  
>
>>Hi,
>>
>>Why this error ir happening? and How to fix?
>>
>>*Warning*: pg_connect(): Unable to connect to PostgreSQL server: FATAL: 
>>IDENT authentication failed for user "fotolis" . in 
>>*/home/fotolis/public_html/connection.php* on line *6
>>    
>>
>
>Is there a postgresql user named fotolis in the database?
>
>select * from pg_user
>
>will tell you.
>
>
>
>
>  
>

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pg_connect error
@ 2008-05-18 20:21  LonLinux <longlinux@gmail.com>
  0 siblings, 2 replies; 8+ messages in thread

From: LonLinux @ 2008-05-18 20:21 UTC (permalink / raw)
  To: pgsql-php

Hello, I have this problem with a connection to postgres server (running in a win2000 server).
When I connect with pgAdmin to the same postgres server works ok, but when I try to connect from php5 the connection fails.
Can help me?
Thanks.

$db_conn = pg_connect("host=SQLMACHINE port=5432 password=xxxx user=postgres dbname=compraventa1");
if (!$db_conn): ?>
    <H1>Failed connecting to postgres database <? echo "compraventa1" ?></H1> <?
    exit;
endif;


Ovax

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_connect error
@ 2008-05-19 01:40  Robert Treat <xzilla@users.sourceforge.net>
  parent: LonLinux <longlinux@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Robert Treat @ 2008-05-19 01:40 UTC (permalink / raw)
  To: pgsql-php; +Cc: LonLinux <longlinux@gmail.com>

On Sunday 18 May 2008 16:21:15 LonLinux wrote:
> Hello, I have this problem with a connection to postgres server (running in
> a win2000 server). When I connect with pgAdmin to the same postgres server
> works ok, but when I try to connect from php5 the connection fails. Can
> help me?
> Thanks.
>
> $db_conn = pg_connect("host=SQLMACHINE port=5432 password=xxxx
> user=postgres dbname=compraventa1"); if (!$db_conn): ?>
>     <H1>Failed connecting to postgres database <? echo "compraventa1"
> ?></H1> <? exit;
> endif;
>

Well, what's the error message? (And if there isnt one, have you looked in the 
db logs? If nothing there, try connecting with psql with the same credentials 
as above, as your web servers user)

-- 
Robert Treat
Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_connect error
@ 2008-05-19 01:42  Chris <dmagick@gmail.com>
  parent: LonLinux <longlinux@gmail.com>
  1 sibling, 0 replies; 8+ messages in thread

From: Chris @ 2008-05-19 01:42 UTC (permalink / raw)
  To: LonLinux <longlinux@gmail.com>; +Cc: pgsql-php

LonLinux wrote:
> Hello, I have this problem with a connection to postgres server (running
> in a win2000 server).
> When I connect with pgAdmin to the same postgres server works ok, but
> when I try to connect from php5 the connection fails.

What error message do you get?

echo pg_last_error($db_conn);

-- 
Postgresql & php tutorials
http://www.designmagick.com/



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* pg_connect() error
@ 2009-09-04 04:19  Arun Oakley <arun.oakley@gmail.com>
  0 siblings, 1 reply; 8+ messages in thread

From: Arun Oakley @ 2009-09-04 04:19 UTC (permalink / raw)
  To: pgsql-php

hi guys,
we have a postgres db with a hosting company and have been trying to connect
to. error is below.
*Warning*: pg_connect()
[function.pg-connect<http://hoopsgm.net/test/function.pg-connect;]:
Unable to connect to PostgreSQL server: could not connect to server:
Connection refused Is the server running on host "pgdb1.host-ed.net" and
accepting TCP/IP connections on port 3306?

from my trawling around google i have found that it could be related to the
postgres.conf file and turning on tcpip sockets to true?? (i cannot
view/edit any postgres conf files)

oh and those are the host/port details supplied by hosting provider


any help would be appreciated in pointing on the right path.

Cheers

Arun

^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: pg_connect() error
@ 2009-09-10 22:51  Chris <dmagick@gmail.com>
  parent: Arun Oakley <arun.oakley@gmail.com>
  0 siblings, 0 replies; 8+ messages in thread

From: Chris @ 2009-09-10 22:51 UTC (permalink / raw)
  To: Arun Oakley <arun.oakley@gmail.com>; +Cc: pgsql-php

Arun Oakley wrote:
> hi guys,
> 
> we have a postgres db with a hosting company and have been trying to 
> connect to. error is below.
> *Warning*: pg_connect() [function.pg-connect 
> <http://hoopsgm.net/test/function.pg-connect;]: Unable to connect to 
> PostgreSQL server: could not connect to server: Connection refused Is 
> the server running on host "pgdb1.host-ed.net 
> <http://pgdb1.host-ed.net>"; and accepting TCP/IP connections on port 3306?

Port 3306 is usually mysql not postgres.

Postgres (by default) uses 5432.

> from my trawling around google i have found that it could be related to 
> the postgres.conf file and turning on tcpip sockets to true?? (i cannot 
> view/edit any postgres conf files)

> oh and those are the host/port details supplied by hosting provider
> 
> 
> any help would be appreciated in pointing on the right path.

Make sure they know you want a postgres db, not mysql.

Apart from that, if you can't view a postgres.conf file let alone change 
it, you need to raise a support issue with them to fix it.

Do they allow remote connections to their database? Maybe they don't for 
security reasons.

-- 
Postgresql & php tutorials
http://www.designmagick.com/




^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2009-09-10 22:51 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-02-02 23:29 PG_CONNECT error Gustavo Paixao <postgresql@fironline.com.br>
2004-02-02 23:53 ` scott.marlowe <scott.marlowe@ihs.com>
2004-02-03 00:25   ` Gustavo Paixao <postgresql@fironline.com.br>
2008-05-18 20:21 pg_connect error LonLinux <longlinux@gmail.com>
2008-05-19 01:40 ` Re: pg_connect error Robert Treat <xzilla@users.sourceforge.net>
2008-05-19 01:42 ` Re: pg_connect error Chris <dmagick@gmail.com>
2009-09-04 04:19 pg_connect() error Arun Oakley <arun.oakley@gmail.com>
2009-09-10 22:51 ` Re: pg_connect() error Chris <dmagick@gmail.com>

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