Article 6GZ5S phpvirtualbox gives error message in browser

phpvirtualbox gives error message in browser

by
paalmarker
from LinuxQuestions.org on (#6GZ5S)
Ubuntu 22.05
php 8.1

I have installed the phpvirtualbox

When accessing http://localhost/phpvirbox/ I get this message:
<snip>There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.

The list of virtual machines will not begin auto-refreshing again until this page is reloaded.
HTTP error: 500 Internal Server Error
</snip>

Have struggled with this issue for a while, but is quite stuck now.

/var/log/apache2/error.log:
[php:error] [pid 15629] [client 127.0.0.1:45324] PHP Fatal error: Uncaught Error: Attempt to assign property "errors" on null in /var/www/html/phpvirbox/endpoints/api.php:338\nStack trace:\n#0 {main}\n thrown in /var/www/html/phpvirbox/endpoints/api.php on line 338, referer: http://localhost/phpvirbox/

service vboxweb-service status:
vboxweb-service.service - LSB: VirtualBox web service API
Loaded: loaded (/etc/init.d/vboxweb-service; generated)
Active: active (exited) since Thu 2023-12-07 10:59:24 CET; 51min ago
Docs: man:systemd-sysv-generator(8)
Process: 19160 ExecStart=/etc/init.d/vboxweb-service start (code=exited, status=0/SUCCESS)
CPU: 8ms

/etc/default/virtualbox:

# Defaults for virtualbox initscript
# sourced by /etc/init.d/virtualbox
# installed at /etc/default/virtualbox by the maintainer scripts

#
# This is a POSIX shell fragment
#

# Set this to 1 if you would like the virtualbox modules to be loaded by
# the init script.
LOAD_VBOXDRV_MODULE=1

# SHUTDOWN_USERS="foo bar"
# check for running VMs of user 'foo' and user 'bar'
# 'all' checks for all active users
# SHUTDOWN=poweroff
# SHUTDOWN=acpibutton
# SHUTDOWN=savestate
# select one of these shutdown methods for running VMs
# acpibutton and savestate causes the init script to wait
# 30 seconds for the VMs to shutdown
SHUTDOWN_USERS=""
SHUTDOWN=poweroff
VBOXWEB_USER=vbox
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments