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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
29 - 12 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC