Frequently Asked Questions

Installation errors

Question #1

I've installed phpPgAdmin but when I try to use it I get an error message telling me that I have not compiled proper database support into my PHP installation.

Answer: This means that your PHP setup doesn't have the pgsql extension.

If you compiled PHP yourself, you need to run configure with the '–with-pgsql' flag. Read the PHP manual and website for more help with this.

PostgreSQL is also available in PHP as a dynamic extension, so if you have precompiled version (Linux RPM, or Windows binary), there are still chances, that only thing you should do is to enable loading it automagically.

It can be done by editing your php.ini file (under Windows, usually in C:\WINDOWS or C:\WINNT, under Linux /etc/php.ini) and uncommenting this line:

;extension=php_pgsql.dll        ;under Windows
;extension=pgsql.so             ;under Linux

so it would look like that:

extension=php_pgsql.dll         ;under Windows
extension=pgsql.so              ;under Linux

In Linux distributions based on Red Hat or Fedora, PHP extensions are automatically configured in /etc/php.d/pgsql.ini, simply install the php-pgsql package.

On Debian-like distribution, the package is php5-pgsql.

Question #2

I get a warning like this when using phpPgAdmin on Windows: “Warning: session_start() [function.session-start]: open(/tmp\sess_5a401ef1e67fb7a176a95236116fe348, O_RDWR) failed”

Answer: You need to edit your PHP.INI file (usually in c:\windows) and change this line:

session.save_path = "/tmp"

to:

session.save_path = "c:\windows\temp"

And make sure that the folder “c:\windows\temp” actually exists.

Login errors

Question #3

I always get “Login failed” even though I'm sure I'm using the right username and password.

Answer: Check the PostgreSQL log on your server, if phpPgAdmin is able to reach your PostgreSQL server, it will give the exact reason why the login is failing. If you can't find anything, then phpPgAdmin can not connect to your PostgreSQL server for some reasons.

Edit the pg_hba.conf file in your PostgreSQL data dir and make sure you have enabled access to the server properly.

If you've installed phpPgAdmin on a computer different from the PostgreSQL server, another likely reason may be that you have not setup PostgreSQL server to listen on your network. By default, PostgreSQL only accept connection on the localhost interface or UNIX socket (under unix-like systems).

To enable this, edit your postgresql.conf file and change this line:

#listen_addresses = 'localhost'

to:

listen_addresses = '*'

…or list each interface IP you want PostgreSQL server listen on, separated with a comma.

Using PostgreSQL 7.4, this is a boolean parameter called tcpip_socket. Change:

#tcpip_socket = false

to:

tcpip_socket = true

You need to restart PostgreSQL after changing these parameters.

On the phpPgAdmin side, read and setup accordingly your phpPgAdmin configuration file (“conf/config.inc.php”). Pay attention to the parameters $conf['servers'][0]['host'] and $conf['extra_login_security'].

If you really want to use the “postgres” role, make sure you set it up a password and $conf['extra_login_security'] is false.

Please, make sure to read question “I can use any password to log in!” as making PostgreSQL listen on the network require to pay attention to your authentication policy.

Question #4

For some users I get a “Login disallowed for security” message.

Answer: Logins via phpPgAdmin with no password or certain usernames (pgsql, postgres, root, administrator) are denied by default. Before changing this behaviour (setting $conf['extra_login_security'] to false in the config.inc.php file) please read the PostgreSQL documentation about client authentication and understand how to change PostgreSQL's pg_hba.conf to enable passworded local connections.

Question #5

I can use any password to log in!

Answer: PostgreSQL, by default, runs in trust mode. That means that it doesn't ask for passwords for local connections. We highly recommend that you edit your pg_hba.conf file, and change the login type to 'md5'. Note that if you change the 'local' login type to 'md5', then you might need to enter a password to start PostgreSQL. Get around this by using a .pgpass file - explained in the PostgreSQL documentation.

Question #6

phpPgAdmin ask me to re-enter login information for every page I access!

Answer: You most certainly have a problem with your PHP sessions. Make sure:

  • your browser accept cookies if your session ID relies on them
  • PHP has write access to the path set in the parameter “session.save_path” of your php.ini
  • check if your server has some security enforcement you need to set up to allow your HTTPD/PHP to work with sessions
  • your server file system where sessions are stored is not full

Question #7

When I access my phpPgAdmin installation, I only have an empty page.

Answer: you have a PHP error and your PHP parameter ”display_errors” is set to “off”.

Depending on your ”log_errors” and ”error_reporting PHP parameters, you should be able to find the PHP errors in your httpd errors log files.

If this is a phpPgAdmin error, and not a PHP setup one, please, send us a report!

Other errors

Question #8

When I enter non-ASCII data into the database via a form, it's inserted as hexadecimal or Ӓ format!

Answer: You have not created your database in the correct encoding. This problem will occur when you try to enter an umlaut into an SQL_ASCII database, or SJIS Japanese into an EUC-JP database, etc.

Question #9

When browsing a table, the 'edit' and 'delete' links do not appear.

Answer: In order, phpPgAdmin will prefer the following as unique row identifiers:

  1. Primary keys
  2. Unique keys (cannot be parital or expressional indexes)
  3. OID column (will be slow to update, unless you index the OID column)

Furthermore, any NULL values in the unique index will mean that that row will be uneditable. Also, since OIDs can become duplicated in a table, phpPgAdmin will alter the row, and then check to ensure that exactly one row has been modified - otherwise rollback will occur.

Questions on dumps

Question #10

What happened to the database dump feature?

Answer: You need to configure phpPgAdmin (in the config.inc.php file) to point to the location of the pg_dump and pg_dumpall utilities on your server. Once you have done that, the database export feature will appear.

Question #11

I would like to use the pg_dump integration for database and table dumps on Windows. How do I get pg_dump.exe on Windows?

Answer: To get the pg_dump utilities on Windows, you need to install PostgreSQL 8.0 or higher (we recommend the latest release) for Windows, available for download from the PostgreSQL ftp site. Once you have installed that, set the pg_dump and pg_dumpall locations in the “config.inc.php” file to 'C:\Program Files\PostgreSQL\8.0\bin\pg_dump.exe' and 'C:\Program Files\PostgreSQL\8.0\bin\pg_dumpall.exe', or wherever you installed them.

Question #12

Why can't I reload the SQL script I dumped in the SQL window?

Answer: The following limitations currently exist in SQL script execution:

  • Only uploaded SQL scripts can contain COPY commands and for this to work, you must have PHP 4.2 or higher.
  • 'psql' commands such as '\connect' will not work at all.
  • You cannot change the current database or current user during the execution of the script.

We do intend to work on some of these limitations in the future, but some of them are PostgreSQL restrictions and we recommend using the 'psql' utility to restore your full SQL dumps.

Other questions

Question #13

When inserting a row, what is does the 'Value' or 'Expression' box mean?

Answer: Choosing 'Expression' means that you can use functions, operators, other field names, etc. in your value - you need to properly quote any literal values yourself. 'Value', on the other hand, means that no matter what you enter as the value, it will be inserted as-is into the database.

Question #14

Why is there never any information on the 'Info' page of a table?

Answer: The Info page will show you what other tables have foreign keys to the current table and some data from the PostgreSQL statistics collector. The stats collector is not enabled by default in PostgreSQL. To enable it, look in your postgresql.conf file for the stats_* options. Just make them all 'true' and restart PostgreSQL.

Question #15

Why can't I download data from queries executed in the SQL window?

Answer: You need to check the 'Paginate results' option to allow downloads.

Question #16

I would like to help out with the development of phpPgAdmin. How should I proceed?

Answer: We really would like your help! Please read the DEVELOPERS and TRANSLATORS files.

Next step is to register to the phppgadmin-devel mailing list.

 
SourceForge
faq.txt · Last modified: 2011/10/04 07:54 by ioguix