Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpPgAdmin - Login Fail - Virtual Class--cannot instantiate

Tags:

phppgadmin

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

like image 566
Sooyong Park Avatar asked Aug 25 '26 22:08

Sooyong Park


2 Answers

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

like image 197
hericklr Avatar answered Aug 28 '26 12:08

hericklr


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 !

like image 43
Edvaldo Filho Avatar answered Aug 28 '26 11:08

Edvaldo Filho



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!