Bug #1164 [Com]: Unable to connect to PostgreSQL, unsupported protocol

From: Date: Mon, 01 Nov 2010 11:13:57 +0000
Subject: Bug #1164 [Com]: Unable to connect to PostgreSQL, unsupported protocol
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155676@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=1164&edit=1

 ID:                 1164
 Comment by:         lakshmi at nace dot co dot in
 Reported by:        B dot Ogryczak at students dot mimuw dot edu dot pl
 Summary:            Unable to connect to PostgreSQL, unsupported
                     protocol
 Status:             Closed
 Type:               Bug
 Package:            PostgreSQL related
 Operating System:   Linux (RH 5.2)
 PHP Version:        3.0.5
 Block user comment: N

 New Comment:

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));
}
?>


Previous Comments:
------------------------------------------------------------------------
[2010-11-01 12:07:54] 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()

------------------------------------------------------------------------
[1999-02-20 12:49:15] 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.

------------------------------------------------------------------------
[1999-02-19 12:07:47] 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.




------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=1164&edit=1


Thread (1 message)

  • lakshmi at nace dot co dot in
  • Unknown Message
    • lakshmi at nace dot co dot in
« previous php.bugs (#155676) next »