[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PHP + PostgreSQL



On Sat, 2004-06-26 at 03:42, deb_milist wrote:
> thanks oliver.....
> but i still get the same error.

Do you mean that it still says it can't find "127.0.0.1," or simply that
it doesn't authenticate?

>  i think it's postgresql auth. problem ( ...or i dunno)
> in the latest howto ( as i sent within my e-mail before ) there's
> differences in how to treath 
> postgresql 7.2 and 7.3 which acoording to the howto those are the only
> postgre environtment this
> techtables has been tested. 
> since i'm running sid with postgresql 7.4.3, i guess there will be
> another setting need to be applied.
> ( example : it said i need to change the value "ident sameuser" to
> "MD5" in pg_hba.conf so postgre
>  will ask for password: in my experience it's failed and when i try to
> replace "MD5" with "password"

Your pg_hba.conf settings had "trust" access, didn't they? (I haven't
kept previous postings.)  If so, PostgreSQL gives access without any
authentication and the problem is in the connection string.

If you change /etc/postgresql/pg_hba.conf, you need to reload or restart
the postmaster after making the change:

   root#  /etc/init.d/postgresql reload

If you changed to "trust" or "md5" authentication without reloading,
PostgreSQL would not take any notice of your changes.

If you are using "md5" authentication (lower case required, I think),
you also need to set the users' passwords before they can be used.  Go
into psql as user postgres and do:

   ALTER USER username WITH PASSWORD 'password goes here';

-- 
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "Therefore being justified by faith, we have peace with
      God through our Lord Jesus Christ."       Romans 5:1 



Reply to: