Thread

  1. RE: [GENERAL] User Authentication Failed

    Jackson, DeJuan <djackson@cpsgroup.com> — 1998-05-19T19:37:26Z

    Make sure the PostgreSQL's postmaster is being run with the -i option.
    Or take out the port number specification in your script.
    
    Hope this helps,
    DEJ
    
    > -----Original Message-----
    > From:	lynch@lscorp.com [SMTP:lynch@lscorp.com]
    > Sent:	Tuesday, May 19, 1998 1:43 PM
    > To:	pgsql-general@postgreSQL.org; php3@lists.php.net
    > Subject:	[GENERAL] User Authentication Failed
    > 
    > The PostgreSQL Glimpse mailing list search thing is down.
    > 
    > I found some similar things in PHP's archives, but none that really
    > seemed
    > applicable.  I only know half the story, though, because my ISP is
    > running
    > PostgreSQL and compiling PHP for me, so it's hard to play around with
    > options and such.
    > 
    > All I can say for sure is:
    > 
    > The php.cgi seems to work okay from the web, as far as phpinfo goes.
    > 
    > psql -u chat works okay, and I've granted everything to user www, and
    > verified that I can psql -u chat and use www as name and password and
    > do a
    > select.
    > 
    > Is there something I need to do to "grant connect access" to user www?
    > I can't seem to find such a beast...
    > 
    > php.cgi -v reports version 3.0b6, but my ISP claimed it was an RC
    > release...
    > 
    > php.cgi is owned by my login name, and when it used to be owned by
    > root, it
    > had an even nastier error message about misconfiguration  :-)
    > 
    > PostgreSQL is probably the most recent version, since it was just
    > rebuilt,
    > which is what caused the trouble.
    > 
    > pg_Connect destructively modifies the arguments passed to it, which
    > seems
    > odd to me, but I'm a lisp hacker, so what do I know?
    > 
    > Here's the actual error message:
    > 
    > Warning: Unable to connect to PostgresSQL server: User authentication
    > failed in /iiw/htdocs/chatmusic.com/connect.php
    > on line 10
    > Couldn't connect to database chat on port 5432 at host ruby
    >   (Options auth=password user=www password=www tty /dev/null)
    > 
    > And my source code that produced it:
    > <HTML>
    >   <HEAD><TITLE>Just Connect To PostgreSQL</TITLE></HEAD>
    >   <BODY>
    >     <?php
    >       $host = "";
    >       $port = 5432;
    >       $options = "";
    >       $tty = "";
    >       $dbname = "chat";
    >       $connection = pg_Connect($host, $port, $options, $tty, $dbname);
    >       if (!$connection){
    >         echo("Couldn't connect to database $dbname on port $port at
    > host
    > $host<BR>\n");
    >         if ($options != "" || $tty != ""){
    >           echo("&nbsp;&nbsp;(Options $options tty $tty)<BR>\n");
    >         }
    >         exit;
    >       }
    >       else{
    >         echo("<H1><CENTER>Successfully Connected</CENTER></H1>\n");
    >         phpinfo();
    >       }
    >     ?>
    >   </BODY>
    > </HTML>
    > 
    > --
    > --
    > -- "TANSTAAFL" Rich lynch@lscorp.com
    > 
    >