apache-php-postgresql connection question

From: tom(dot)kemp(at)philips(dot)com
To: pgsql-php(at)postgresql(dot)org
Subject: apache-php-postgresql connection question
Date: 2002-01-31 19:11:24
Message-ID: OFF4D46284.400DEEEC-ON86256B52.005FF5D3@diamond.philips.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hi,

I am new to apache, php, and postgresql. I had been tasked with creating a database for use in my work environment, accessible via web browsers. I read up on SQL, postgresql and mysql and chose postgresql. I have the database built and rebuildable via
sql script for postgresql implementation. I am being pushed to rewrite this and use MySQL by my IT department. I don't want to use MySQL, based on some advantages I have seen during comparison research and the expected future size and complexity of the
database. Some advantages that I am using are views, subqueries, triggers and foreign keys.

I have had to try to justify Postgresql ( IT Department). One advantage that I planned to make good use of is views. However, I am being told that if I use web access through apache to PHP to my postgresql server, I am opening a single user connection
and views become irrelevant in regard to permissions. My knowledge/expectation based on reading books was that I could use the database view permissions I set up for in postgresql for a go/no-go on database use of the views via apache server -> php
engine -> connection request to postgresql server.

I am a bit confused now. My understanding was I could use the pg_connect() command, supplying username and password in a php script, and have the connect be based on the security of the database permissions. Is this not true? Can I not do this for each
browser based request?

Also, if I do a persistent connection, it appears that PHP will try to use this connection if it exists, prior to creating a new persistent connection, right? Well, does it only reuse the already connected persistent if it is the same user? How does
this work? Does it check that it is the same user/password (does my script have to supply this in the second persistent connection function) prior to using the preexisting connection? Is it tied to the current browser request?

Thanks in advance for your time and help!

Tom

Browse pgsql-php by date

  From Date Subject
Next Message Marco Colombo 2002-01-31 19:12:20 Re: pg_pconnect - ??
Previous Message Josh Berkus 2002-01-31 18:18:59 Re: keyword search help