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