将 phpPgAdmin 集成到 XAMPP 会引发错误

Integrating phpPgAdmin to XAMPP throws errors

我用 Xampp 7.2.1 安装了 Postgre。 Postgre 数据库。数据库工作得很好,但我无法让 phpPgAdmin 工作。 我从这里下载了 phpPgAdmin: https://sourceforge.net/projects/phppgadmin/ 我按照本网站的说明进行操作: http://subhra.me/install-postgresql-in-xampp-on-windows-and-integrate-phppgadmin/

我尝试了以下方法让 phpPgAdmin 工作:

1.I 将下载的 phppgadmin ZIP 解压缩到我的 Xampp 文件夹: C:\xampp\phppgadmin 2、我打开了C:\xampp\phpPgAdmin\conf\下的config.inc.php,编辑文件如下:

$conf['servers'][0]['host'] = 'localhost';
$conf['servers'][0]['pg_dump_path'] = 'C:\xampp\PostgreSQL\9.5\bin\pg_dump.exe';
$conf['servers'][0]['pg_dumpall_path'] = 'C:\xampp\PostgreSQL\9.5\bin\pg_dumpall.exe';
$conf['extra_login_security'] = false;

3.Than 我打开了在 c:\xampp\apache\conf\extra\httpd-xampp.conf 中找到的 httpd-xampp.conf 并执行了以下操作:

Alias /phppgadmin "C:/xampp/phppgadmin/"
<directory "C:/xampp/phppgadmin">
AllowOverride AuthConfig
Require all granted
</directory>

现在我收到此错误消息:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Misc has a deprecated constructor in C:\xampp\phppgadmin\classes\Misc.php on line 8.

  1. {main}() C:\xampp\phppgadmin\index.php:0
  2. include_once() C:\xampp\phppgadmin\index.php:11

Warning: session_name(): Cannot change session name when headers already sent in C:\xampp\phppgadmin\libraries\lib.inc.php on line 55

  1. {main}() C:\xampp\phppgadmin\index.php:0
  2. include_once() C:\xampp\phppgadmin\index.php:11
  3. session_name() C:\xampp\phppgadmin\libraries\lib.inc.php:55

Warning: session_start(): Cannot start session when headers already sent in C:\xampp\phppgadmin\libraries\lib.inc.php on line 56

  1. {main}() C:\xampp\phppgadmin\index.php:0
  2. include_once() C:\xampp\phppgadmin\index.php:11
  3. session_start() C:\xampp\phppgadmin\libraries\lib.inc.php:56

Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\phppgadmin\classes\Misc.php:8) in C:\xampp\phppgadmin\classes\Misc.php on line 526

  1. {main}() C:\xampp\phppgadmin\index.php:0
  2. Misc->printHeader() C:\xampp\phppgadmin\index.php:12
  3. header() C:\xampp\phppgadmin\classes\Misc.php:526

非常感谢您的帮助,在此先致谢

如您所见,https://sourceforge.net/projects/phppgadmin/, the latest updates were made more than five years ago to phpPgAdmin, so it was not yet made compatible to recent PHP versions. Their bugtracker 列出了您的问题。

https://github.com/ReimuHakurei/phppgadmin 有一个分叉,声称已解决这些问题。