On 17/09/2012 07:15, Yvon Thoraval wrote:
> 
> I'm testing my second PostgreSQL install on Xunutu 12.04 after a disk crash.
> 
> Everything went well using command line where i was able, after config
> and setup, to log into a db using :
> $ psql <IPV4 or IPV6 of the server> -U yt -d yt_tests
> 
> Then i wanted to test postgres thru php where i got Http error 500.
> 
> After that i discovered that i do have TWO psql installed :
> 
> the first :
> lrwxrwxrwx 1 root root 37 mars   6  2012 /usr/bin/psql ->
> ../share/postgresql-common/pg_wrapper 
> 
> the second :
> -rwxr-xr-x 1 root root 433224 août  17 00:58
> /usr/lib/postgresql/9.1/bin/psql

The first isn't a "real" psql - it's a symlink to pg_wrapper, which is
how Debian and Ubuntu allow you to run different Postgres versions and
clusters on the same machine. You call the client program (psql,
pg_dump, etc) you want as usual, but pass it the --cluster option, as
follows:

  psql --cluster 9.1/main (....)

and then pg_wrapper calls the correct version of the client program.


> 
> then, i wonder how to workaround this "installation bugg" because i
> suspect php is using the second not working psql where the first is the
> one being in my PATH.

PHP doesn't use psql, it uses libpq (the client library).

Ray.

-- 
Raymond O'Donnell :: Galway :: Ireland
r...@iol.ie


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to