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: newbie question about PHP
Date: Tue, 23 Jun 1998 21:22:15 -0700
Message-ID: <35907EF7.E8527FA7@statsol.com> (raw)

i am trying to connect to a database using webpages with embedded php3.0

postmaster is running with the -i option
the database is running with the -u option
the web user is nobody, and user nobody has select privileges on
the given database.
from the shell, i can access the database as user nobody
$ psql -u mydatabase
Username: nobody
Password: xxxx
mydatabase=>
---------------
<?PHP
 $conn = pg_Connect("localhost", "5432", "user=nobody,password=demo",
"", "grocery");
 if (!$conn) {
   echo "An error occurred.\n";
   exit;
 }
....
?>

this is what resulting page says:

Warning: Unable to connect to PostgresSQL server: User authentication
failed in
        /home1/s/statsol/public_html/test/test.phtml on line 21
                         An error occurred.

my user=,password= is obviously a hack, i am just looking for how to
specify it for the pgoptions part of the pg_connect; help with the
syntax would be much appreciated.

thanks,
steve doliov



view thread (2+ messages)  latest in thread

Message-ID: <35907EF7.E8527FA7@statsol.com>
Permalink:  ../35907EF7.E8527FA7@statsol.com/
Also on:    postgresql.org/message-id/35907EF7.E8527FA7@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: newbie question about PHP
  In-Reply-To: <35907EF7.E8527FA7@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