0

我正在尝试学习 PostgreSQL,因此在我的笔记本电脑上安装了它和 phppgAdmin。

我去了 localhost/phppgadmin,登录并在首页上看到所有这些错误:

我尝试在 Google 上进行故障排除,但不幸的是,这个问题没有足够的答案。

显示的错误

此外,config.inc.php 文件在我根据我遵循的将数据库连接到 PHP 的教程进行更改后看起来像这样:

$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'] = 'localhost';

// 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'] = 'C:\\xampp\\pgSql\\11.2\\pg_dumpall.exe';

先感谢您

编辑:是否可以只使用原始 pgadmin?!

4

1 回答 1

0

这个错误是因为你运行的phpPgAdmin版本不支持php7。您可以降级 PHP 版本或从 git master 运行代码,可在https://github.com/phppgadmin/phppgadmin获得。

于 2019-07-30T07:28:47.113 回答