LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-03-2014, 08:01 PM   #1
andrewm659
Member
 
Registered: Oct 2004
Distribution: CentOS/Fedora/OpenSuse
Posts: 61

Rep: Reputation: 1
Cool setting up phppgadmin


Hey Everyone i'm trying to setup phpPgAdmin on my server and I keep getting this error Configuration error: Copy conf/config.inc.php-dist to conf/config.inc.php and edit appropriately.
I have followed tutorials that tell me how to set it up, but its not working.

I'm running CentOS 6.5 with PostgreSQL 8.4.

Here is the file itself:

cat /etc/phpPgAdmin/config.inc.php

<?php

/**
* Central phpPgAdmin configuration. As a user you may modify the
* settings here for your particular configuration.
*
* $Id: config.inc.php-dist,v 1.55 2008/02/18 21:10:31 xzilla Exp $
*/

// An example server. Create as many of these as you wish,
// indexed from zero upwards.

// Display name for the server on the login screen
$conf['servers'][0]['desc'] = 'PostgreSQL';

// Hostname or IP address for server. Use '' for UNIX domain socket.
// use 'localhost' for TCP/IP connection on this computer
$conf['servers'][0]['host'] = '';

// Database port on server (5432 is the PostgreSQL default)
$conf['servers'][0]['port'] = 5432;

// Database SSL mode
// Possible options: disable, allow, prefer, require
// To require SSL on older servers use option: legacy
// To ignore the SSL mode, use option: unspecified
$conf['servers'][0]['sslmode'] = 'allow';

// Change the default database only if you cannot connect to template1.
// For a PostgreSQL 8.1+ server, you can set this to 'postgres'.
$conf['servers'][0]['defaultdb'] = 'template1';

// Specify the path to the database dump utilities for this server.
// You can set these to '' if no dumper is available.
$conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';

// Slony (www.slony.info) support?
$conf['servers'][0]['slony_support'] = false;
// Specify the path to the Slony SQL scripts (where slony1_base.sql is located, etc.)
// No trailing slash.
$conf['servers'][0]['slony_sql'] = '/usr/share/pgsql';

// Example for a second server (PostgreSQL for Windows)
//$conf['servers'][1]['desc'] = 'Test Server';
//$conf['servers'][1]['host'] = '127.0.0.1';
//$conf['servers'][1]['port'] = 5432;
//$conf['servers'][1]['sslmode'] = 'allow';
//$conf['servers'][1]['defaultdb'] = 'template1';
//$conf['servers'][1]['pg_dump_path'] = 'C:\\Program Files\\PostgreSQL\\8.0\\bin\\pg_dump.exe';
//$conf['servers'][1]['pg_dumpall_path'] = 'C:\\Program Files\\PostgreSQL\\8.0\\bin\\pg_dumpall.exe';
//$conf['servers'][1]['slony_support'] = false;
//$conf['servers'][1]['slony_sql'] = 'C:\\Program Files\\PostgreSQL\\8.0\\share';


// Example of groups definition.
// Groups allow administrators to logicaly group servers together under group nodes in the left browser tree
//
// The group '0' description
//$conf['srv_groups'][0]['desc'] = 'group one';
//
// Add here servers indexes belonging to the group '0' seperated by comma
//$conf['srv_groups'][0]['servers'] = '0,1,2';
//
// A server can belong to multi groups
//$conf['srv_groups'][1]['desc'] = 'group two';
//$conf['srv_groups'][1]['servers'] = '3,1';


// Default language. E.g.: 'english', 'polish', etc. See lang/ directory
// for all possibilities. If you specify 'auto' (the default) it will use
// your browser preference.
$conf['default_lang'] = 'auto';

// AutoComplete uses AJAX interaction to list foreign key values
// on insert fields. It currently only works on single column
// foreign keys. You can choose one of the following values:
// 'default on' enables AutoComplete and turns it on by default.
// 'default off' enables AutoComplete but turns it off by default.
// 'disable' disables AutoComplete.
$conf['autocomplete'] = 'default on';

// If extra login security is true, then logins via phpPgAdmin with no
// password or certain usernames (pgsql, postgres, root, administrator)
// will be denied. Only set this false once you have read the FAQ and
// understand how to change PostgreSQL's pg_hba.conf to enable
// passworded local connections.
$conf['extra_login_security'] = true;

// Only show owned databases?
// Note: This will simply hide other databases in the list - this does
// not in any way prevent your users from seeing other database by
// other means. (e.g. Run 'SELECT * FROM pg_database' in the SQL area.)
$conf['owned_only'] = false;

// Display comments on objects? Comments are a good way of documenting
// a database, but they do take up space in the interface.
$conf['show_comments'] = true;

// Display "advanced" objects? Setting this to true will show
// aggregates, types, operators, operator classes, conversions,
// languages and casts in phpPgAdmin. These objects are rarely
// administered and can clutter the interface.
$conf['show_advanced'] = false;

// Display "system" objects?
$conf['show_system'] = false;

// Display reports feature? For this feature to work, you must
// install the reports database as explained in the INSTALL file.
$conf['show_reports'] = true;

// Database and table for reports
$conf['reports_db'] = 'phppgadmin';
$conf['reports_schema'] = 'public';
$conf['reports_table'] = 'ppa_reports';

// Only show owned reports?
// Note: This does not prevent people from accessing other reports by
// other means.
$conf['owned_reports_only'] = false;

// Minimum length users can set their password to.
$conf['min_password_length'] = 1;

// Width of the left frame in pixels (object browser)
$conf['left_width'] = 200;

// Which look & feel theme to use
$conf['theme'] = 'default';

// Show OIDs when browsing tables?
$conf['show_oids'] = false;

// Max rows to show on a page when browsing record sets
$conf['max_rows'] = 30;

// Max chars of each field to display by default in browse mode
$conf['max_chars'] = 50;

// Send XHTML strict headers?
$conf['use_xhtml_strict'] = false;

// Base URL for PostgreSQL documentation.
// '%s', if present, will be replaced with the PostgreSQL version
// (e.g. 8.4 )
$conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/';

// Configuration for ajax scripts
// Time in seconds. If set to 0, refreshing data using ajax will be disabled (locks and activity pages)
$conf['ajax_refresh'] = 3;

/*****************************************
* Don't modify anything below this line *
*****************************************/

$conf['version'] = 19;

?>
 
Old 07-04-2014, 03:30 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by andrewm659 View Post
Hey Everyone i'm trying to setup phpPgAdmin on my server and I keep getting this error Configuration error: Copy conf/config.inc.php-dist to conf/config.inc.php and edit appropriately. I have followed tutorials that tell me how to set it up, but its not working.

I'm running CentOS 6.5 with PostgreSQL 8.4.
What tutorials have you tried? Because based on what you posted below, you haven't configured the program AT ALL yet, so it's not surprising it's not working.

The first step is VERY obvious: did you copy that file as you were told to first? Then you edit it, and change the parameters to match what's on your system. The entire config file is commented, and tells you what options each flag takes...so, change them to match how your system is configured.
Quote:
Here is the file itself:
Code:
<?php

        /**
         * Central phpPgAdmin configuration.  As a user you may modify the
         * settings here for your particular configuration.
         *
         * $Id: config.inc.php-dist,v 1.55 2008/02/18 21:10:31 xzilla Exp $
         */

        // An example server.  Create as many of these as you wish,
        // indexed from zero upwards.

        // Display name for the server on the login screen Is this actually the name of your server?
        $conf['servers'][0]['desc'] = 'PostgreSQL';

        // Hostname or IP address for server.  Use '' for UNIX domain socket.
        // use 'localhost' for TCP/IP connection on this computer  Very obviously, you put the name/address of your database server here
        $conf['servers'][0]['host'] = '';

        // Database port on server (5432 is the PostgreSQL default) Is this the port you're using?
        $conf['servers'][0]['port'] = 5432;

        // Database SSL mode
        // Possible options: disable, allow, prefer, require
        // To require SSL on older servers use option: legacy
        // To ignore the SSL mode, use option: unspecified
        $conf['servers'][0]['sslmode'] = 'allow';  Are you using SSL??

        // Change the default database only if you cannot connect to template1                                         
        // For a PostgreSQL 8.1+ server, you can set this to  'postgres'.  Are you using Postgres 8.1 or higher???                                                                                                                                               
        $conf['servers'][0]['defaultdb'] = 'template1';                                                                     
                                                                                                                                                            
        // Specify the path to the database dump utilities for this server. Is this the right path??
        // You can set these to '' if no dumper is available.
        $conf['servers'][0]['pg_dump_path'] = '/usr/bin/pg_dump';                                                                       
        $conf['servers'][0]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
                                                                                                                                                                                                                                             
        // Slony (www.slony.info) support? Yes or no??                                                                                    
        $conf['servers'][0]['slony_support'] = false;                                  
        // Specify the path to the Slony SQL scripts (where slony1_base.sql is located, etc.)                                                               
        // No trailing slash.   Right place, if so???    
        $conf['servers'][0]['slony_sql'] = '/usr/share/pgsql';                                                                 
                                                                                                                                                                                                                                             
        // Default language. E.g.: 'english', 'polish', etc.  See lang/ directory
        // for all possibilities. If you specify 'auto' (the default) it will use 
        // your browser preference.
        $conf['default_lang'] = 'auto';

        // AutoComplete uses AJAX interaction to list foreign key values 
        // on insert fields. It currently only works on single column 
        // foreign keys. You can choose one of the following values:
        // 'default on' enables AutoComplete and turns it on by default.
        // 'default off' enables AutoComplete but turns it off by default.
        // 'disable' disables AutoComplete.
        $conf['autocomplete'] = 'default on';

        // If extra login security is true, then logins via phpPgAdmin with no
        // password or certain usernames (pgsql, postgres, root, administrator)
        // will be denied. Only set this false once you have read the FAQ and
        // understand how to change PostgreSQL's pg_hba.conf to enable
        // passworded local connections.
        $conf['extra_login_security'] = true;

        // Only show owned databases?
        // Note: This will simply hide other databases in the list - this does
        // not in any way prevent your users from seeing other database by
        // other means. (e.g. Run 'SELECT * FROM pg_database' in the SQL area.)
        $conf['owned_only'] = false;

        // Display comments on objects?  Comments are a good way of documenting
        // a database, but they do take up space in the interface.
        $conf['show_comments'] = true;

        // Display "advanced" objects? Setting this to true will show 
        // aggregates, types, operators, operator classes, conversions, 
        // languages and casts in phpPgAdmin. These objects are rarely 
        // administered and can clutter the interface.
        $conf['show_advanced'] = false;

        // Display "system" objects?
        $conf['show_system'] = false;

        // Display reports feature?  For this feature to work, you must
        // install the reports database as explained in the INSTALL file.
        $conf['show_reports'] = true;

        // Database and table for reports
        $conf['reports_db'] = 'phppgadmin';
        $conf['reports_schema'] = 'public';
        $conf['reports_table'] = 'ppa_reports';

        // Only show owned reports?
        // Note: This does not prevent people from accessing other reports by
        // other means.
        $conf['owned_reports_only'] = false;

        // Minimum length users can set their password to.
        $conf['min_password_length'] = 1;

        // Width of the left frame in pixels (object browser)
        $conf['left_width'] = 200;

        // Which look & feel theme to use
        $conf['theme'] = 'default';

        // Show OIDs when browsing tables?
        $conf['show_oids'] = false;

        // Max rows to show on a page when browsing record sets
        $conf['max_rows'] = 30;

        // Max chars of each field to display by default in browse mode
        $conf['max_chars'] = 50;

        // Send XHTML strict headers?
        $conf['use_xhtml_strict'] = false;

        // Base URL for PostgreSQL documentation.
        // '%s', if present, will be replaced with the PostgreSQL version
        // (e.g. 8.4 )
        $conf['help_base'] = 'http://www.postgresql.org/docs/%s/interactive/';

        // Configuration for ajax scripts
        // Time in seconds. If set to 0, refreshing data using ajax will be disabled (locks and activity pages)
        $conf['ajax_refresh'] = 3;

        /*****************************************
         * Don't modify anything below this line *
         *****************************************/

        $conf['version'] = 19;

?>
See comments in bold above; answer the questions in the file, and start the service.
 
Old 07-04-2014, 03:37 PM   #3
andrewm659
Member
 
Registered: Oct 2004
Distribution: CentOS/Fedora/OpenSuse
Posts: 61

Original Poster
Rep: Reputation: 1
So I made a big oops yesterday and was REALLY tired. I forgot that I had deleted the config file and copied the -dist file to config.inc.php. So its set to default.

I used this tutorial.

http://stansantiago.wordpress.com/20...re-phppgadmin/
 
Old 07-04-2014, 05:02 PM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
PostgreSQL: Documentation: Getting Started and
https://www.linuxquestions.org/quest...gs-4175464257/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the Username and Password of phpPgAdmin? chillyroll Linux - Software 2 10-25-2006 04:54 AM
How to start phpPGAdmin in Mandrake 10.1? bdika Mandriva 2 09-06-2005 05:59 PM
Apache-php-postgresql-phppgadmin koswo Linux - Software 0 02-05-2004 06:05 AM
phpPgAdmin setup problems deadlock Linux - Software 3 12-18-2003 05:19 AM
problem with installing phppgadmin elea0612 Programming 0 05-22-2003 04:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration