免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4764 | 回复: 2
打印 上一主题 下一主题

phpPgAdmin如何设置??? [复制链接]

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-02-01 14:21 |只看该作者 |倒序浏览
我们的pgsql完全正常运行,因为已经安装phpbb使用pgsql数据库了。
但是现在运行不了phppgadmin,相关设置文件如下,忘那位使用过的可以帮助以下:
<?php
/* $Id: config.inc.php-dist,v 1.10 2002/06/04 18:24:50 killroyboy Exp $ */

// Set the name and version
$cfgProgName    = "phpPgAdmin";
$cfgVersion     = "2.4.2";

// The default database is used to connect to the database to check the adv_auth
//      This can actually be any database you currently have on your system.  It just
//      needs _a_ database to connect and check the system tables.
$cfgDefaultDB   = "template1";

// You should change the superuser if different from postgres
//      This is just used to filter out the system functions when listing
$cfgSuperUser   = "postgres";

//      If you want to be able to view the contents and structure of the System Catalog/Tables set t
//      If you are new to Postgres or are not familiar with the system tables, it is suggested you l
$cfgSysTables   = true;

//      If you want the web interface to administer postgres user, set this as true.
$cfgUserAdmin   = true;

//      If you want to enable reporting
$cfgReports             = true;

// If you want to filter the databases to only the ones the user has created or owns.
// This has no affect if the user is a superuser.
$cfgUserDatabases = true;

//  Set this to true during development of phpPgAdmin
$cfgDebug               = false;

// If you do NOT want to quote all relations, set this to false
$cfgQuotes              = true;

// Maximum pages to display link in browse
$cfgMaxPages    = 9;

// If you do not want to display the tables of a database in the left frame, add it to this array
//      This feature is very useful when you have a database that has many tables and slowes down th
// $cfgNoTables[]       = "big_table";

/******************************** IMPORTANT SECURITY NOTICE ********************************
        By default, Postgres does not check passwords through a local connection.  This is
        a major security if connecting through a local unix socket with phpPgAdmin.  You
        have a few options to close this security hole:
        1. You can connect through a TCP connection (use the -i option to start postgres)
                - Set $cfgServers
  • ['local'] = false;
                    - Edit your $PGDATA/pg_hba.conf file to accept connections from localhost
                            with password authentication
            2. Edit your $PGDATA/pg_hba.conf file to use password authentication through a
                    local connection.
    ********************************* IMPORTANT SECURITY NOTICE *******************************/


    // The $cfgServers array starts with $cfgServers[1].  Do not use $cfgServers[0].
    // You can disable a server config entry by setting host to ''.
    $cfgServers[1]['local']         = false;
    $cfgServers[1]['host']          = '';
    $cfgServers[1]['port']          = '5432';
    $cfgServers[1]['adv_auth']      = true;

    $cfgServers[1]['user']          = '';   // if you are not using adv_auth, enter the username to conn
    $cfgServers[1]['password']      = '';   // if you are not using adv_auth and a password is required
    $cfgServers[1]['only_db']       = '';   // if set to a db-name, only this db is accessible

    $cfgServers[2]['local']         = false;
    $cfgServers[2]['host']          = '';
    $cfgServers[2]['port']          = '5432';
    $cfgServers[2]['adv_auth']      = true;

    $cfgServers[2]['user']          = '';   // if you are not using adv_auth, enter the username to conn
    $cfgServers[2]['password']      = '';   // if you are not using adv_auth and a password is required
    $cfgServers[2]['only_db']       = '';   // if set to a db-name, only this db is accessible

    $cfgServers[3]['local']         = false;
    $cfgServers[3]['host']          = '';
    $cfgServers[3]['port']          = '5432';
    $cfgServers[3]['port']          = '5432';
    $cfgServers[3]['adv_auth']      = true;

    $cfgServers[3]['user']          = '';   // if you are not using adv_auth, enter the username to conn
    $cfgServers[3]['password']      = '';   // if you are not using adv_auth and a password is required
    $cfgServers[3]['only_db']       = '';   // if set to a db-name, only this db is accessible

    // If you have more than one server configured, you can set $cfgServerDefault
    // to any one of them to autoconnect to that server when phpPGAdmin is started,
    // or set it to 0 to be given a list of servers without logging in
    // If you have only one server configured, $cfgServerDefault *MUST* be
    // set to that server.
    $cfgServerDefault               = 1;    // default server  (0 = no default server)
    $cfgServer                      = '';   // the selected server is copied here for easier access
    unset($cfgServers[0]);          // Since 0 = no server, $cfgServers[0] must not be used

    $cfgManualBase                  = "http://www.postgresql.org/idocs/index.php";

    $cfgConfirm                     = true;
    $cfgPersistentConnections       = false;

    // If you have a table with several thousands of records, you will want to set this false.
    $cfgCountRecs                   = true;

    // If you want the fields alphabetized when inserting/editing
    // If you want the fields alphabetized when inserting/editing
    $cfgDoOrder                     = false;

    $cfgBorder                              = "0";
    $cfgThBgcolor                           = "#D3DCE3";
    $cfgBgcolorOne                          = "#CCCCCC";
    $cfgBgcolorTwo                          = "#DDDDDD";
    $cfgMaxRows                                     = 30;
    $cfgMaxInputsize                        = "300px";
    $cfgMaxTextAreaSize                     = "400px";
    $cfgOrder                                       = "ASC";

    $cfgShowBlob                            = false;
    $cfgShowSQL                             = true;

    // Set the maximum characters in any given field to diplay in "browse" mode - 0 is unlimited
    $cfgMaxText                                     = 255;

    $cfgMember                              = "#CCCCFF";
    $cfgNonMember                           = "#CCCC99";
    $cfgMaxTries                            = 10;

    // Set your language preferences here.
    include("english.inc.php";

    ?>;
  • 论坛徽章:
    1
    技术图书徽章
日期:2013-12-05 23:25:45
    2 [报告]
    发表于 2003-02-01 14:39 |只看该作者

    phpPgAdmin如何设置???

    按道理我们应该使用tcp连接。
       相关数据:
       连接主机:localhost/222.222.222.222
        连接用户:admin
        连接密码:admin

    论坛徽章:
    1
    荣誉版主
日期:2011-11-23 16:44:17
    3 [报告]
    发表于 2003-02-05 11:44 |只看该作者

    phpPgAdmin如何设置???

    $cfgServers[1]['host'] = '';
    应该设置为:
    $cfgServers[1]['host'] = '127.0.0.1';
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP