phpPgAdmin - Login Fail - Virtual Class--cannot instantiate

9.3k Views Asked by At

So I followed every step of the YouTube video on getting phpPgAdmin setup with XAMPP.

After I access localhost/phppgadmin using the credentials..

  1. USERNAME: postgres
  2. password: the password I created during setup..

I click login and I get ..

Virtual Class -- cannot instantiate

Having a hard time figuring this out, can someone please help me. Thank you

2

There are 2 best solutions below

2
On

I searched for the string "Virtual Class -- cannot instantiate" within all files in the folder and found it in the file "adodb.inc.php" (in my version it is on line 432):

  /**
   * Constructor
   */
  function __construct()            
  {
    die('Virtual Class -- cannot instantiate');
  }

So I commented the line and phpPgAdmin started working again.

PS: it doesn't seem like the most appropriate way to fix the problem, but I needed it working soon

0
On

For people who are having problems in 2023 . @hericklr answer doenst is appropriate .

This is related with php ^8.0 versions !

Unfortunately for i see in the github phppgadmin page , the owner doesnt apply a update for long time .

So i made a fork updated : https://github.com/EdvaldoAFilho/pgAdmin

Just download and extract to : /usr/share/phppgadmin

(/usr/share/phppgadmin/[files])

Hope it works !