From: | "Dave Potts" <dave(dot)potts(at)pinan(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | problems connecting to php via pg_connect and PGCLUSTER |
Date: | 2012-02-06 23:03:34 |
Message-ID: | f2577f4f1e1919d27358c4c45ee4d5ab.squirrel@dp2642.force9.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I have two versions of postgres installed, 8.4 and 9.1 installed on the
same machine
To connect to my 9.1 database, I defined the envromental variable
PGCLUSTER=9.1/main
and use psql to connect via php pg_connect
I have try saying
define("PG_OPTIONS" , "--cluster=9.1/main");
and using the phrase
$con = pg_connect("dbname=".PG_DB." host=".PG_HOST." user=".PG_USER."
options=".PG_OPTIONS);
When I attempt to connect to postgres, I get the error
[Mon Feb 06 22:37:40 2012] [error] [client 127.0.0.1] PHP Warning:
pg_connect(): Unable to connect to PostgreSQL server: FATAL: unrecognised
configuration parameter "cluster" in /var/www/re/php/pgrouting.php on line
33, referer: http://127.0.0.1/re/routing-final.html
Any suggestions as to the correct way of connecting to postgres?
Dave.
--
From | Date | Subject | |
---|---|---|---|
Next Message | Chris | 2012-02-06 23:38:31 | Re: problems connecting to php via pg_connect and PGCLUSTER |
Previous Message | deepak | 2012-02-06 22:14:55 | pg_upgrade: out of memory |