Phppgadmin Common errors and Solutions _postgresql

Source: Internet
Author: User
Tags documentation md5 postgresql psql

First, installation Error
Q: I've installed the phppgadmin, but when I try to use it,
I got a bug saying that I installed PHP without the correct compile database support.

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

PostgreSQL support can be compiled into PHP's dynamic expansion module,
So if you're using a precompiled version of PHP (a Linux RPM package or a binary file under Windows),
Maybe you just need to do one thing:

Edit the php.ini file and uncomment the following two lines:
(usually under WINDOWS in the C:\WINDOWS or C:\WINNT directory, Linux is usually located in/etc/php.ini)

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

Make it into:

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

On Linux distributions based on Red Hat or Fedora,
The PHP extension has been automatically configured in the/etc/php.d/pgsql.ini file,
Just install 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 need to modify your PHP. INI file (usually in the C:\Windows directory) and will be like the downlink

Session.save_path = "/tmp"

Amended to

Session.save_path = "C:\Windows\Temp"

And make sure the C:\Windows\Temp directory does exist.
Second, the landing error
Q: I always get a "Login failed" and I'm sure I used the correct username and password!

A: Check the PostgreSQL log, which will tell you the exact reason for the landing failure.
Edit the pg_hba.conf file in the PostgreSQL "data" directory,
Make sure you have the correct permissions to access the database server.

If you install Phppgadmin on a machine that is different from the PostgreSQL server,
Another possible cause is that PostgreSQL did not enable TCP/IP sockets at startup.
To enable it, you can edit the postgresql.conf file, which will be like the downlink

#tcpip_socket = False

Amended to

Tcpip_socket = True

Then restart the PostgreSQL.
The original virtual_host and Tcpip_socket configuration instructions have been replaced by listen_addresses, starting with the 8.0 version.
See PostgreSQL For more explanation of listen_addresses instructions.

Q: Some users will get "Login Disallowed for Security" error message

A:phppgadmin default prohibits null password or specific user (Pgsql, postgres, root, Administrator) landing.
Before changing this default behavior (setting the $conf [' extra_login_security '] in the config.inc.php file to False),
Please read the section on client authentication in the PostgreSQL documentation carefully first.
and fully understand how to modify the PostgreSQL pg_hba.conf configuration file to enable password-protected local connections.

Q: I can use any password login!

A:postgresql runs in trust mode by default. This means that the password is 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 change the ' local ' login type to ' MD5 ', you may need to enter the password when you start the PostgreSQL.
To avoid it, you can use a. pgpass file and refer to the PostgreSQL Documentation LIBPQ section for instructions.
Third, other errors
Q: When I enter non-ASCII data through a table one-way database, it is inserted in the hexadecimal number or Ӓ format.

A: You did not use the correct encoding to create the database.
This problem will occur when you attempt to enter a vowel tone (umlaut) into a sql_ascii database,
Or when you enter Sjis characters into the EUC-JP database.

Q: When I drop and build a table with the same name, I fail.

A: The easiest way to do this is to use a version of PostgreSQL 7.3.

Q: When I browsed a table, the ' edit ' and ' delete ' links did not appear.

A:phppgadmin will use the following values as the row unique identifiers in order

1. Primary key
2. Unique index (cannot be a partial index or an expression index)
3. OID column (continuous scan is required to update unless you have indexed on the OID column)

In addition, any NULL value in a unique index can cause that row to be non-editable. Similarly, because the OID may be repeated in the same table,
Phppgadmin will make sure that the change is made after the line is changed, or it will be rolled back.
Iv. dump-related
Q: How do I enable the database dump feature?

A: You need to configure the config.inc.php file to specify the location of Pg_dump and Pg_dumpall.
This will show the database export functionality.

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 a higher version.
can go to http://www.postgresql.org/ftp/win32/to download.
After installation, you can set the location of Pg_dump and Pg_dumpall in config.inc.php.

Q: Why can't I reload the dump SQL script in the SQL window?

A: The following restrictions are encountered when executing SQL scripts:

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

* ' psql ' commands, such as ' \connect ', do not work at all.

* Multi-line SQL statements also do not work, such as:

CREATE TABLE Example (
A INTEGER
);

* You cannot switch databases and users while executing scripts.

We intend to reduce these limitations in future releases, but there is no limit to the limitations of PostgreSQL itself,
Therefore, we recommend that you use the ' psql ' tool to restore the full SQL dump results.

V. OTHER ISSUES

Q: What does the value (value) or ' Expression (expression) ' marquee mean when inserting rows?

A: Choosing ' Expression ' means you can use functions, operators, field names, and so on,
At the same time you need to use quotes to define string values correctly.
Select ' Value ' to indicate that whatever you enter is inserted into the database as is.

Q: Why does the ' info ' page of the table always show no information?

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

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

A: You need to select the ' paginate Results ' option to allow downloads.

Q: I want to help phppgadmin development, what should I do?

A: We'd love to have your help! Please read the developers and translators files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.