php.net |  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
 [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.
Regards,
David Quinn-Jacobs

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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-2019 The PHP Group
All rights reserved.
Last updated: Sat Jan 19 02:01:25 2019 UTC