This article will show you how to install the latest version of phpPgAdmin (currently 2.3) which allows you easier maintenance of your database.
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 config.inc.php 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.
Page URL: http://www.4webhelp.net/tutorials/db/phppgadmin.php
Back to the "pretty" page!
© 2025, 4WebHelp Team.
I have downloaded php 4.0.1, any help would be appreciated.
thanks
I can't find an answer to this simple question.
Add a new comment