Re: [GENERAL] php - pgsql connection - Mailing list pgsql-general

From Aaron J. Seigo
Subject Re: [GENERAL] php - pgsql connection
Date
Msg-id 99101513065402.00558@stilborne
Whole thread Raw
In response to php - pgsql connection  (Sebestyen Zoltan <szoli@netvisor.hu>)
Responses Re: [GENERAL] php - pgsql connection
List pgsql-general
hi...

>  I would like to know what's the problem with following line:
> $dbConn = pg_Connect( "  host=$host  user=$user  password=$password port=$port dbname=$dbname");
>
>  The php variables are filled with the appropriate values.

are you sure?

>  Warning: Unable to connect to PostgresSQL server: connectDB() -- connect
> () failed: Can't assign requested address Is the postmaster running (with
> -i) at 'localhost' and accepting connections on TCP/IP port 'dbname='? in
                                                                     ^^^^^^^^^^^

my guess is that $port is not assigned. its trying to connect to port
'dbname=', which is actually the start of the next variable pair. $port should
have some numeric data in it, something like 5432...

--
Aaron J. Seigo
Sys Admin

pgsql-general by date:

Previous
From: "Aaron J. Seigo"
Date:
Subject: Re: [GENERAL] User defined function
Next
From: soundar rajan
Date:
Subject: jdbc problem