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

Re: PHP + PostgreSQL



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

  
Sorry Oliver, i was just too desprated. The current error is different from the previous which simply said : techtables didn't know which host to connect.
It has been solved since i use your script.
Error message ( using function.inc file with your modification ) :

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: IDENT authentication failed for user "techtables" . in /var/www/techtables/functions.inc on line 11
Cannot connect


  
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';

  
I do.
"psql -U techtables techtables" prompt me for password and after i filled the password ;
"techtables=>" it's fine.
I even blindly reload postgre,
apache, and keep my browser clean from previous cache.

glenn wrote:
Hi
I'm using a similar environment, but I've lost the start of the thread -
wanna send me your original message and I'll have a look?
Glenn
Since it may be a big e-mail if I send it to this room I'll send it you e-mail.
If anyone else would like to have it, let me know.

thanks for your kindly attentions.

--me--

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: