pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Doliov <doliov@statsol.com>
To: pgsql-novice@postgresql.org
Cc: pgsql-interfaces@postgresql.org
Subject: still can't connect to postgres vi PHP3.0
Date: Wed, 24 Jun 1998 12:13:54 -0700
Message-ID: <35914FF2.2C113A9F@statsol.com> (raw)

thanks for all the responses but i seem to be having the identical
problem that another user was having, i keep getting user authentication
failure messages from my php pages and the postmaster log confirms this
too.

the lines in my pg_hba.conf file read
local all password password
host all xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx password password

the database was created with the -u option.

so i thought maybe that is the problem.  so i created a database without
the -u option.  still got the authentication error.

so then i changed my pg_hba.conf lines to trust.

the tables definitely have select privileges for user nobody
niether of the calls:
pg_Connect("host=$host port=$port user=$user password=$password
dbname=$dbname) 

nor

pg_Connect("localhost","","","mydatabase")

works.  does anyone have this working.
if so, can they send me
1) the relevant pieces of the pg_hba.conf file
2) the command used to create the database
3) the syntax by which they establish the database connection from
witihin php3
4) other info:
     version of webserver (presumably apache, i am running 1.3.0)
     version of postgresql
     the user the webserver runs as

i've checked the php website and their archives on postgres are thin:
there is some sample code there which creates a class that serves as a
wrapper to connecting to postgres but there is no other info which is
helping me see my way out of this.  i've scanned the pgsql-interfaces
archives and haven't seen relevant headers.

would love more help.
i can attach the html source and grant access to the database in
question so people can access it remotely and let me know if that works
for them.
the database name is statsol_weblogs
the ip address of the server is 198.11.51.133
the user is nobody,
the password is demo
the table in that database is named webpages
(this is the database that was created with the createdb -u option)

another database is named testing
user nobody
password is demo
the table in that database is named weblogs

if you want to try a remote connection, just let me know what your ip
address is and i will update my pg_hba.conf in a snap.

thanks,
steve doliov



Message-ID: <35914FF2.2C113A9F@statsol.com>
Permalink:  ../35914FF2.2C113A9F@statsol.com/
Also on:    postgresql.org/message-id/35914FF2.2C113A9F@statsol.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: doliov@statsol.com, pgsql-novice@postgresql.org
  Subject: Re: still can't connect to postgres vi PHP3.0
  In-Reply-To: <35914FF2.2C113A9F@statsol.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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