|
Posted by Erwin Moller on 01/08/07 10:27
Alfred wrote:
> The PHP web app that I'm building uses PostgreSQL. Of course it won't
> work right off the bat, so my web app is going to have to detect that
> it has never been configured with a database and have to instruct the
> sysop on what to do. What are developers in the PHP industry doing with
> their installers to ensure everything with PostgreSQL is going to work
> out right?
Just describe clearly what users on the database are made and what their
rights should be.
Maybe add some tutorial with commands for GRANT or something.
Then let the guy that installs the database read that document.
Also add a SQL-script that creates the tables/relations/etc.
Do not make a binary dump, but the text-SQL variant, so people can actually
read what tables are created.
You do not want to make a seperate installer for Postgresql, are you?
>
> In particular I'm going to want the web app to have a local database
> (by default), although a remote one is an option. The web app will
> require a username and password to reach the database. What pg_hba.conf
> configuration would you recommend most highly for new installations?
Well, the pg_hba.conf is a file that should be maintained by the sysop.
So just mention WHICH users should be added with what rights.
Maybe suggest the lines to add to pg_hba.conf.
For security, do not allow others on the same machine (trust-setting) to
connect to your database. The 'fallthrough' approach is used in
postgresql's pg_hba.conf, so you must explicity say that other cannot
connect if you have a few users in the environment.
To make this sure, add a 'reject' as last line for your listed allowed
connections to your database.
Good luck, and wise choice (Postgres). :-)
Regards,
Erwin Moller
[Back to original message]
|