PHP and Postgres setup
am 21.03.2005 14:10:46 von germ germ
I have installed Postgres on Suse 9.1 and created a
test database but am unable to connect to it through
PHP.
What do I need to configure in order for Appache and
Postgres to be able to talk back and forth?
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: PHP and Postgres setup
am 21.03.2005 14:34:14 von Matthew Terenzio
On Mar 21, 2005, at 8:10 AM, germ germ wrote:
>
> What do I need to configure in order for Appache and
> Postgres to be able to talk back and forth?
A couple things need to be done. It would help if you stated where and
what the failure message was. If you haven't gotten that far then start
with these items.
1. Check to see if you started postgres with a -i flag. this alows it
to receive connections over the internet.
2.Also, in pg_hba.conf you must make sure you are allowing connections
from the web server host. If that is the local host, you should be okay
if you can already connect with the given user and pass you are going
to use inside the PHP scripts. Restart postgres if you change this
file. remember the -i again.
3. And you must have PHP compiled with postgres support.
You don't really need to change Apache. At least it's not necessary to
start making connections to the DB.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match
Re: PHP and Postgres setup
am 21.03.2005 17:15:55 von Michael Fuhr
On Mon, Mar 21, 2005 at 05:10:46AM -0800, germ germ wrote:
> I have installed Postgres on Suse 9.1 and created a
> test database but am unable to connect to it through
> PHP.
Please show the PHP code you're using to connect and any error
messages you get. Without seeing what you're doing and what's
happening, guesses about what's wrong would have little basis.
> What do I need to configure in order for Appache and
> Postgres to be able to talk back and forth?
See the "Database Users and Privileges" and "Client Authentication"
chapters in the PostgreSQL documentation. Verify that you can
connect to the database with psql before trying it with PHP. Make
sure PHP has PostgreSQL support (you can check by examining phpinfo()
output).
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Delay INSERT
am 23.03.2005 12:07:36 von skyer
Hi
Does PostgreSQL have something like "INSERT DELAYD" - like it is used in
MySQL?
or any other way to delay inserting?
Thanx
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Re: Delay INSERT
am 23.03.2005 14:33:29 von Michael Fuhr
On Wed, Mar 23, 2005 at 02:46:38PM +0300, ON.KG wrote:
> Does PostgreSQL have something like "INSERT DELAYD" - like it is used in
> MySQL?
>
> or any other way to delay inserting?
What problem are you trying to solve? Are you aware that PostgreSQL
uses Multiversion Concurrency Control (MVCC) so readers and writers
don't block each other?
http://www.postgresql.org/docs/8.0/static/mvcc.html
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
Re: Delay INSERT
am 23.03.2005 15:42:18 von Christopher Browne
After a long battle with technology, skyer@on.kg ("ON.KG"), an earthling, wrote:
> Does PostgreSQL have something like "INSERT DELAYD" - like it is used in
> MySQL?
>
> or any other way to delay inserting?
What problem are you trying to solve by using "INSERT DELAYED"?
As far as I can tell, the problem solved using "INSERT DELAYED" is
that in MySQL AB's product, processes take out full table locks when
they modify tables.
That is completely irrelevant with PostgreSQL, as PostgreSQL does not
lock tables that way.
Unless your concern is something rather more abstruse, I think you're
trying to solve a problem that simply doesn't exist. There is no
reason to delay inserts in PostgreSQL because there are no such locks.
--
(format nil "~S@~S" "cbbrowne" "gmail.com")
http://linuxdatabases.info/info/slony.html
"I would rather spend 10 hours reading someone else's source code than
10 minutes listening to Musak waiting for technical support which
isn't." -- Dr. Greg Wettstein, Roger Maris Cancer Center
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org