|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #474 pg_Connect error (in one format but not another)
Submitted: 1998-06-24 17:06 UTC Modified: 1998-06-24 17:12 UTC
From: dqj at requesttech dot com Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 3.0 Final Release OS: Redhat Linux 5.x
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dqj at requesttech dot com
New email:
PHP Version: OS:


 [1998-06-24 17:06 UTC] dqj at requesttech dot com
I am using password protection in my pg_hba.conf file and
a -i on the postmaster command line.  This appears to work
correctly for the psql command from the local host and outside
hosts.  It does not work well for pg_Connect() in PHP 3.0.

Using this form of the command, the connection works, but works regardless of 
whether the password is valid or not:

  $dbConn = pg_Connect( "host=localhost port=5432 user=dqj password=dqjdqj dbname=sssystem" );

Using the following form, the page returns no data:

  $dbConn = pg_connect("host=localhost", "port=5432", "user=dqj password=dqjdqj", "","dbname=sssystem");

Thanks for any help/patch.
David Quinn-Jacobs


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-06-24 17:12 UTC] zeev
What made you think that 2nd format is supposed to work?
That would be asking PHP to connect to host "host=localhost",
at port "port=5432", using user "user=dqj password=dqjdqj"
and databasename "dbname=sssystem"...

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue May 30 10:03:42 2023 UTC