Hello,
as i found out recently versions of HestiaCP have some php functions disabled by default.
Unfortunately two of these “exec” and “passthru” are needed in order to have phppgadmin (equivalent fo phpmyadmin but for postgresql) exporting the DB.
These are the recorded errors
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function exec() in /usr/share/phppgadmin/dbexport.php:30\nStack trace:\n#0 /usr/share/phppgadmin/dataexport.php(50): include()\n#1 {main}\n thrown in /usr/share/phppgadmin/dbexport.php on line 30', referer: https://MYDOMAIN/phppgadmin/tblproperties.php?subject=table&table=companies&action=export&server=localhost%3A5432%3Aallow&database=admin_imonitor&schema=public
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Call to undefined function passthru() in /usr/share/phppgadmin/dbexport.php:136\nStack trace:\n#0 {main}\n thrown in /usr/share/phppgadmin/dbexport.php on line 136', referer: https://MYDOMAIN/phppgadmin/schemas.php?subject=schema&action=export&server=localhost%3A5432%3Aallow&database=admin_imonitor&schema=public
I understand the security concerns but also see that phpmyadmin and pgppgadmin are part of the HestiaCp package, so they should be fully functional (or some UI alert should be thrown to the user).
Anyway after googling a bit i found how to re-enable the 2 functions and have my functionality back:
- Go to https://YOURDOMAIN.com:8083/edit/server/php/
- Click “Advanced options” (bottom)
- Look for “disable_functions” and remove “exec” and “passthru” from the list
- Hit “SAVE” (up right)
Hope this helps the community