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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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.
Regards,
David Quinn-Jacobs

Patches

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 17:01:27 2025 UTC