php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1164 Unable to connect to PostgreSQL, unsupported protocol
Submitted: 1999-02-19 12:07 UTC Modified: 1999-02-20 12:49 UTC
From: B dot Ogryczak at students dot mimuw dot edu dot pl Assigned:
Status: Closed Package: PostgreSQL related
PHP Version: 3.0.5 OS: Linux (RH 5.2)
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: B dot Ogryczak at students dot mimuw dot edu dot pl
New email:
PHP Version: OS:

 

 [1999-02-19 12:07 UTC] B dot Ogryczak at students dot mimuw dot edu dot pl
Since version 6.4.x PostgreSQL introduced new 
frontend/backend protocol (v 2.0), even tho I
recompiled PHP3 with the new libpg it doesn't
support this protocol. I get error:

Unable to connect to PostgreSQL server,
Unsupported frontend protocol in ...

I'm running Linux, RH 5.2 with PostgreSQL 6.4.2
PHP 3.0.5.



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-02-20 12:49 UTC] eschmid
It's not a PHP problem. Can you connect throu the psql-monitor? If you can, 
you should be able to connect from PHP as well.
 [2010-11-01 12:07 UTC] lakshmi at nace dot co dot in
i couldnt able to connect to postgresql database, when i am using pg_connect it is simply throwing an error as undefined function pg_connect()
 [2010-11-01 12:13 UTC] lakshmi at nace dot co dot in
Hi, 

  Can anyone tell me what would be the mistake in below mentioned program,
when I execute this program simply it is throwing an error as : Call to undefined function pg_connect(),I can able to connect from psql separately
but while trying to connect it from php it is throwing error.

<?php
$database=pg_connect("host=localhost dbname=test user=postgres");
if(!$database)
{
    die("Could not connect -> " .pg_last_error(). pg_errormessage($database));
}
?>
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 08:01:28 2025 UTC