Search code examples
phppostgresqlxamppphppgadmin

Integrating phpPgAdmin to XAMPP throws errors


I installed Postgre with Xampp 7.2.1. Postgre Database. The database just works just fine, but I`m having trouble getting phpPgAdmin to work. I downloaded phpPgAdmin from here: https://sourceforge.net/projects/phppgadmin/ I followed the instructions from this website: http://subhra.me/install-postgresql-in-xampp-on-windows-and-integrate-phppgadmin/

I tried the following to get phpPgAdmin to work:

1.I extracted the downloaded phppgadmin ZIP to my Xampp folder: C:\xampp\phppgadmin 2. I opened the config.inc.php which can be found C:\xampp\phpPgAdmin\conf\ and edited the file as follows:

$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 I opened the httpd-xampp.conf to be found in c:\xampp\apache\conf\extra\httpd-xampp.conf and did the following:

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

Now I`m getting this error message:

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

I`d appreciate some help and thanks in advance


Solution

  • As you can see at 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 lists your problem among others.

    There is a fork at https://github.com/ReimuHakurei/phppgadmin which claims to have these problems fixed.