From: | Enrico Ortmann <pg(dot)php(at)radax(dot)net> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | can't create db |
Date: | 2004-01-16 10:30:23 |
Message-ID: | 549163046.20040116113023@radax.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-php |
Hello proggers,
I got a strange problem while creating a database FROM PHP:
I connect from SuSE shell via php to a PG-server [7.3.2] using command
$conn = @pg_pconnect("host=db port=5432 user=postgres dbname=template1");
[db is an Alias in /etc/hosts an points to 192.168.0.200]
Then I create a database using command
pg_exec($conn,"CREATE DATABASE dvl_ao_27_beta;");
All works fine!
But when I connect using the IP-adress instead of the alias
$conn = @pg_pconnect("host=192.168.0.200 port=5432 user=postgres dbname=template1");
the handle is valid as well, but then if I want to create the database I got the error
ERROR: CREATE DATABASE: source database "template1" is being accessed by other users
Does anybody have an idea what goes wrong in case I use the IP?
Enrico Ortmann
----------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | scott.marlowe | 2004-01-16 17:42:47 | Re: pg_connect(): Cannot create new link |
Previous Message | Seader, Cameron | 2004-01-15 22:41:03 | timestamptz Insert |