You are using a browser which is not compatible with CSS (for more information, see Tara's tutorial). Because of this, it is possible that our website may not appear correctly in your browser. We apologise for the inconvenience, and recommend you upgrade your browser to one which is compatible with CSS. For more information, please visit our Browser Upgrade page.


Installing phpPgAdmin by Peter

Last updated: 02/05/2012


This article will show you how to install the latest version of phpPgAdmin (currently 2.3) which allows you easier maintenance of your database.


To begin:

Unzip the downloaded archive to a folder on your computer. Decide what you are going to call the folder, and rename it. I am not going to suggest a name for reasons of security - giving the folder an odd name is the first line of defence against malicious hackers.

Open in your text editor. On line 11 you will find $cfgDefaultDB    "template1";
Alter this to read $cfgDefaultDB    "dbname";

The next thing you need to edit is the following:

$cfgServers[1]['local']        = true;
$cfgServers[1]['host']        = 'localhost';
$cfgServers[1]['port']        = '5432';
$cfgServers[1]['adv_auth']     = true;
$cfgServers[1]['stduser']     = '';
$cfgServers[1]['stdpass']     = '';
$cfgServers[1]['user']         = '';
$cfgServers[1]['password']     = '';
$cfgServers[1]['only_db']     = '';

to look like:

$cfgServers[1]['local']        = false;
$cfgServers[1]['host']        = 'address.of.your.sql.server';
$cfgServers[1]['port']        = '5432';
$cfgServers[1]['adv_auth']     = false;
$cfgServers[1]['stduser']     = '';
$cfgServers[1]['stdpass']     = '';
$cfgServers[1]['user']         = 'username';
$cfgServers[1]['password']     = 'password';
$cfgServers[1]['only_db']     = 'dbname';

Note: You may have to set the port number to somethin different: check the details supplied by Freedom2surf.
Leaving only_db blank will not allow you to view everyone's databases - it will just slow down phpPgAdmin so that it is impossible to use.

I have also found it useful to set $cfgMaxText to 0 - while it slows browsing the database slightly, it does allow you to see the full contents of any text field. Non-English speaking people will also want to change the language preference at the bottom of the file.

Save the changes, and then upload the folder to the server. Point your browser to it and check that everything works. I now suggest that you follow the Password Protecting My Site tutorial and protect the directory. That way no-one else can play with your database!

© 4WebHelp and Peter

Copying and distributing this tutorial for public or commercial use without the written consent of myself is strictly prohibited.

Latest comments on this tutorial
i have downloadded phppgmyAdmin 5.0.3 and its file is xtremly different than yours ... how do i configure it Sad
Same Here
I've opened the file, however the file is different to the one above.

I have downloaded php 4.0.1, any help would be appreciated.

same here ....
jo luso
I have installed phpPGAdmin on debian. My silly question is: how do I access it?

I can't find an answer to this simple question.
oo yeaa

Add a new comment

This page is © Copyright 2002-2022, 4WebHelp. It may not be reproduced without 4WebHelp's prior permission.