Version history: ChangeLog
Installation instructions: INSTALL
General notes: README
All configurable data is placed in config.inc.php.
$cfgServers array
phpPgAdmin supports the adminstration of multiple PostgreSQL servers.
A $cfgServers-array contains the login information for
the different server. $cfgServers[0]['host'] contains the hostname of the first server,
$cfgServers[1]['host'] the hostname of the second server, etc. If you have only one server to administer,
simply leave free the hostname of the other $cfgServer-entries.
$cfgServers[n]['local'] bool
Determines whether the host is on the local machine or not.
$cfgServers[n]['port'] string
The port-number of your n-th PostgreSQL server. Default is 5432.
$cfgServers[n]['host'] string
The hostname of your n-th PostgreSQL server. E.g. localhost.
$cfgServers[n]['adv_auth'] boolean
Whether basic or advanced authentification should be used for this server. Basic authentification
($adv_auth = false) is the plain old way: username and password are stored in
config.inc.php. Advanced authentication $adv_auth = true) allows you to log in as any valid
PostgreSQL user via HTTP-Auth. All you have to provide in config.inc.php is a standard user which
can connect to PostgreSQL and read the PostgreSQL user table.
Using advanced authentification is recommended:
$cfgServers[n]['user'] string
$cfgServers[n]['password'] string
The user/password-pair which phpPgAdmin will use to connect to this PostgreSQL server.
Not needed when using advanced authentication.
$cfgServers[n]['only_db'] string
If set to a database name, only this database will be shown to the user.
$cfgDefaultDB string
The default database is used to connect to the database to check the adv_auth and perform other "general" tasks.
This can actually be any database you currently have on your system.
It just needs _a_ database to connect and check the system tables.
$cfgSuperUser string
Set the $cfgSuperUser to be the user you used to install postgres.
This is just used to filter out the system functions/tables when listing
$cfgSysTables bool
If you want to be able to view the contents and structure of the System Catalog/Tables set this to true.
If you are new to Postgres or are not familiar with the system tables, you should leave this as false.
$cfgUserAdmin bool
If you want the web interface to administer postgres user, set this as true.
$cfgDebug bool
Set this to true during development of phpPgAdmin
$cfgQuotes bool
If you want to quote all relations (enabling capitalization), set this to true.
$cfgMaxPages int
This value controls the number of links to different "pages" when browsing a table.
It will display $cfgMaxPages number of links before and after the current page.
$cfgManualBase string
If set to an URL which points to the PostgreSQL documentation, appropriate help links
are generated.
$cfgPersistentConnections boolean
Whether persistent connections should be used or not (pg_connect or pg_pconnect).
Persistent connection are not currently recomended as the author has experienced unexpected results.
$cfgConfirm boolean
Whether a warning ("Are your really sure..") should be displayed when
you're about to loose data.
$cfgMaxRows integer
Number of rows displayed when browsing a resultset. If the resultset contains
more rows, Previous/Next links will be shown.
$cfgMaxInputsize integer
Size of the edit-field when adding a new record to a table.
$cfgBorder integer
The size of a table's border.
$cfgThBgcolor string [HTML color]
The color (HTML) used for table headers.
$cfgBgcolorOne string [HTML color]
The color (HTML) #1 for table rows.
$cfgBgcolorTwo string [HTML color]
The color (HTML) #2 for table rows.
$cfgOrder string ["DESC"|"ASC"]
Defines whether fields are displayed in ascending ("ASC") order or in descending
("DESC") order when you click on the field-name.
$cfgShowSQL boolean
Defines whether sql-queries generated by phpPgAdmin should be displayed or not.
I can't insert new rows into a table - PostgreSQL brings up a SQL-error.
Most of the time it just that - a SQL error. Probably you're specifying
a wrong field-type. Common errors include:
At least I made this error often when I started using PostgreSQL :-)
Have a look at the PostgreSQL manual (syntax chapter) when in doubt.
phpPgAdmin can't connect to PostgreSQL. What's wrong?
Either there is an error with your PHP setup or your username/password is
wrong. Try to make a small script which uses pg_connect and see if it works.
If it doesn't, it may be you haven't even compiled PostgreSQL support into PHP.
I cannot edit the content of a table, even if the README says this is a
feature of phpPgAdmin.
phpPgAdmin requires a table to have a unique or primary key to allow edit/delete
buttons when using browse or select functionality.
phpPgAdmin always gives "Access denied" when using advanced authentification.
This could happen for several reasons:
I can't reload the schema I got from the "view dump" utility, how can I back up my database?
There are known issues with the view dump utility such as version conflicts and some problems with advanced features like functions and/or triggers. While it should be useful for everyday work, we don't recommend it's use for system back ups, migrations, or other mission critical tasks. In those cases it is strongly recommended you use the pg_dump program that is distributed with postgres.
I would like to help out with the development of phpPgAdmin. How should I proceed?
The following method is preferred for new developers:
What's the preferred way of making phpPgAdmin secure against evil access?
This depends on your system. If you're running a server which cannot be accessed by other people, it's sufficient to use the directory protection bundled with your webserver (with Apache you can use .htaccess files, for example). If other people have telnet access to your server, it's not a good idea to store the PostgreSQL password in clear text in your config.inc.php file. You should use phpPgAdmin's advanced authentification feature in this case. Please be aware that phpPgAdmin's security is only as good as your databases security itself. If you have an open configuration of the database (like using trusted connections) phpPgAdmin's security features probably won't help you. For more information on this see the postgresql documentation.