首页 > 解决方案 > 将 phpPgAdmin 集成到 XAMPP 会引发错误

问题描述

我用 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.我将下载的 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.然后我打开在 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>

现在我收到此错误消息:

弃用:与其类同名的方法在 PHP 的未来版本中将不再是构造函数;Misc 在第 8 行的 C:\xampp\phppgadmin\classes\Misc.php 中有一个已弃用的构造函数。

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

警告:session_name():当第 55 行的 C:\xampp\phppgadmin\libraries\lib.inc.php 中的标头已发送时,无法更改会话名称

  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

警告:session_start():当第 56 行的 C:\xampp\phppgadmin\libraries\lib.inc.php 中已发送标头时无法启动会话

  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

警告:无法修改标头信息 - 标头已由第 526 行 C:\xampp\phppgadmin\classes\Misc.php 中的(输出从 C:\xampp\phppgadmin\classes\Misc.php:8 开始)发送

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

我会很感激一些帮助,并在此先感谢

标签: phppostgresqlxamppphppgadmin

解决方案


正如您在https://sourceforge.net/projects/phppgadmin/所看到的,最新的更新是在五年多前对 phpPgAdmin 进行的,因此它尚未与最新的 PHP 版本兼容。他们的bugtracker列出了您的问题。

https://github.com/ReimuHakurei/phppgadmin上有一个分支,声称已修复这些问题。


推荐阅读