Re: Unable to connect to PostgreSQL server:

From: "Crombleholme, Roy" <Roy(dot)Crombleholme(at)its(dot)lancscc(dot)gov(dot)uk>
To: "'info(at)1234567(dot)dk'" <info(at)1234567(dot)dk>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Unable to connect to PostgreSQL server:
Date: 2004-02-18 09:21:21
Message-ID: 4F9235D7B7D2D611B8DB000802E65AC50623C2@lccmail2.lancscc.gov.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Sorry what do you mean by connecting through PHP, do you mean through a
script??

It may have something to do with you pg_hba.conf, basically if you connect
through pgadmin, you are connecting from the webserver to the db server, so
postgres sees the web servers IP address. If you are connecting through
PHP, then if you are not on the web server then it will be coming from a
different address, which leads me to believe that it may be the pg_hba.conf.

If your web and db server are on the same box, then I think the pg_hba.conf
is default set up to trust connections on 127.0.01 so you wouldn't be
prompted for a password, whereas if your connecting from somewhere else, you
may need a password or you may be denied access due to your IP address.

Hope this helps in some way.

Roy Crombleholme
Systems/Software Engineer
ICT Services
Resources Directorate
Lancashire County Council
* Tel: 01772 5-31849
* Email: roy(dot)crombleholme(at)its(dot)lancscc(dot)gov(dot)uk

-----Original Message-----
From: info(at)1234567(dot)dk [mailto:info(at)1234567(dot)dk]
Sent: 17 February 2004 12:33
To: pgsql-novice(at)postgresql(dot)org
Subject: [NOVICE] Unable to connect to PostgreSQL server:

I have a problem: I cannot connect to my Postgresql database from PHP
- but I can connect from PgAdmin.

I get this error:
Unable to connect to PostgreSQL server: FATAL: IDENT authentication
failed for user

What is wrong ?

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org

********************
This e-mail contains information intended for the addressee only.
It may be confidential and may be the subject of legal and/or professional privilege.
If you are not the addressee you are not authorised to disseminate, distribute, copy or use this e-mail or any attachment to it
The content may be personal or contain personal opinions and unless specifically stated or followed up in writing, the content cannot be taken to form a contract or to be an expression of the County Council's position.
LCC reserves the right to monitor all incoming and outgoing email
LCC has taken reasonable steps to ensure that outgoing communications do not contain malicious software and it is your responsibility to carry out any checks on this email before accepting the email and opening attachments.
********************

Browse pgsql-novice by date

  From Date Subject
Next Message Andy Collins 2004-02-18 11:08:37 Host variables (from C) in EmbeddedSQL
Previous Message Wim 2004-02-18 07:58:28 Re: INSERT or COPY: Which one?