Solutions to common phpPgAdmin errors and problems

  • 2020-05-06 11:51:40
  • OfStack

1. Wrong installation of
Q: I have phpPgAdmin installed, but when I try to use it,
    I got an error saying that the PHP I installed did not have proper compiled database support.

A: this information means that your PHP does not compile PostgreSQL support. The correct configuration option is '-- with-pgsql '.
Please read the PHP manual carefully for more detailed information on how to compile PHP.

    PostgreSQL supports dynamic extension modules that can be compiled to PHP,
    so if you're using a precompiled version of PHP (RPM package under Linux or binaries under Windows),
Maybe you only need to do one thing:

    edits the php.ini file and uncomments the following two lines:
    (Windows usually under C:\WINDOWS or C:\WINNT directory, Linux usually under /etc/ php.ini)

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

    makes it:

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

    on Linux distributions based on Red Hat or Fedora,
    the PHP extension has automatic in/etc/php d/pgsql ini file configured,
    simply installs the php-pgsql package.


Q: when using phpPgAdmin on Windows, I get the following warning message:

      "Warning: session_start() [function.session-start]:
        open(/tmp\sess_5a401ef1e67fb7a176a95236116fe348, O_RDWR) failed"

A: you will need to modify your PHP.INI file (usually located in the c:\windows directory) and will use the following line

      session.save_path = "/tmp"

    changed to

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

    and ensure that the c:\windows\temp directory does exist.
2. Login error
Q: I always get an "Login failed" and I'm sure I'm using the right username and password!

A: check the PostgreSQL log and it will tell you exactly why the login failed.
    edits pg_hba.conf in the "data" directory of PostgreSQL,
    makes sure you have the right access to the database server.

If you install phpPgAdmin on a different machine than the PostgreSQL server,
Another possible reason for     is that PostgreSQL was not started with TCP/IP sockets enabled.
To enable it, edit the postgresql.conf file, which will look like the following line

      #tcpip_socket = false

    changed to

      tcpip_socket = true

    then restart PostgreSQL.
Starting with version 8.0, the original virtual_host and tcpip_socket configuration instructions have been replaced by listen_addresses.
See PostgreSQL for more explanation of the listen_addresses directive.

Q: some users will get the "Login disallowed for security" error message

A: phpPgAdmin does not allow you to login with an empty password or a specific user (pgsql, postgres, root, administrator) by default.

  before changing this default behavior (setting $conf['extra_login_security'] in the config.inc.php file to false) Please read the section on client authentication in the PostgreSQL document first,
    and fully understands how to modify the pg_hba.conf configuration file of PostgreSQL to enable password protection of local connections.

Q: I can log in with any password!

A: PostgreSQL runs in trust mode by default. This means that passwords are not checked for local connections.
We strongly recommend that you modify the pg_hba.conf file and change the login type to 'md5'.
Note that once you have changed the 'local' login type to 'md5', you may need to enter your password when starting PostgreSQL.
To avoid it,     can use a.pgpass file. Please refer to the libpq section of PostgreSQL documentation for instructions.
Other errors
Q: when I enter non-ASCII data into the database through the form, it is treated as a hexadecimal number or Ӓ Format insertion.

A: you did not create the database with the correct encoding.
    this problem will occur when you attempt to enter a metatonic metaphone (umlaut),
, into an SQL_ASCII database     or when entering SJIS characters into EUC-JP database.

Q: when I drop and rebuilt a table with the same name, it failed.

A: the easiest way is to use PostgreSQL 7.3 or more.

Q: when I browse through a table, the 'edit 'and 'delete' links are not displayed.

A: phpPgAdmin will use the following values in order as the row unique identifier

  1. Primary key
  2. Unique index (cannot be partial index or expression index)
  3. OID column (requires continuous scanning for updates, unless you have an index on OID column)

In addition, any NULL value in a unique index causes that row to be uneditable. Again, because OID might be repeated in the same table,
    phpPgAdmin will verify that the row is indeed that row after the change, otherwise it will be rolled back.
4. Dump related
Q: how do I enable database dumps?

A: you need to configure the config.inc.php file to specify the locations of pg_dump and pg_dumpall.
    this database export function will be displayed.

Q: I want to use pg_dump on Windows. Where should I download pg_dump.exe?

A: you need to install PostgreSQL 8.0 for Windows or later.
    to http: / / www postgresql. org/ftp/win32 / to download.
After     is installed, the locations of pg_dump and pg_dumpall can be set in config.inc.php.

Q: why can't I reload the dumped SQL script in the SQL window?

A: when executing the SQL script, there are the following restrictions:

  * only uploaded SQL scripts can contain the COPY command and must use PHP 4.2 or above.

The   * 'psql' command, such as '\connect', does not work at all.

  * multi-line SQL statements also do not work, e.g.

    CREATE TABLE example (
      a INTEGER
    );

  * cannot switch between database and user during script execution.

    we intend to reduce these limitations in future releases, but there is nothing we can do about the limitations of PostgreSQL itself,
    therefore we recommend that you use the 'psql' tool to recover the full SQL dump.

5. Other problems

Q: what does the 'Value(value)' or 'Expression(expression)' marquee mean when inserting a row?

A: selecting 'Expression' means you can use functions, operators, field names, etc.
    also requires you to properly define string values using quotes.
Selecting 'Value' means that whatever you enter will be inserted into the database as is.

Q: why does the 'Info(information)' page of the table never show any information?

The A: 'Info' page is used to display foreign keys from other tables to this table and statistics from PostgreSQL.
    is not enabled by default for the state statistics program. To enable it, see the stats_* option in the postgresql.conf file.
Set all these options to 'true' and restart PostgreSQL.

Q: why can't I download the result data of the query executed in the SQL window?

A: you need to select the 'Paginate results' option to allow downloading.

Q: I want to help with the development of phpPgAdmin. What should I do?

A: we'd love to have your help! Please read the DEVELOPERS and TRANSLATORS files.


Related articles: