I am using the release phpvirtualbox-4.3-3 and phpvirtualbox-5.0-4 but found that it couldn't work with PHP7 (I need PHP7 for my new project).
I tried to trace the code, and found that in file "lib/auth/Builtin.php" (of phpvirtualbox-4.3-3), the "break" statement at line 173 and line 181 have to change to "return". Next, need to installed package php-xml.x86_64 on my CentOS to enable SimpleXML. The login prompt is working afterwards but it still doesn't work after input the username and password with parse error at "lib/ajax.php". I didn't go further as I need to continue my work.
I am looking forward for phpVirtualBox to include support for PHP7 :)
Last edit: VCD 2015-12-09
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
New versions of phpVirtualBox have this code section in /endpoints/api.php instead of lib/ajax.php . VCD's suggestions above ending with adding {}s indeed did fix that line, and was enough to start the web-interface working again.
My system is:
Arch
extra/apache 2.4.18-1
extra/php 7.0.1-5
community/phpvirtualbox 5.0_3-1
You can find php errors, and thus other lines that need to fixed, on a default install as above here:
/var/log/httpd/error_log
In my case:
"
PHP Fatal error: Uncaught Error: Function name must be a string in /usr/share/webapps/phpvirtualbox/endpoints/api.php:316\nStack trace:\n#0 {main}\n thrown in /usr/share/webapps/phpvirtualbox/endpoints/api.php on line 316
"
I have same problem in 5.0.5 not working with new ubuntu server 16.04 with php7... An unknown PHP error occurred. This is most likely a syntax error in config.php in phpVirtualBox's folder. The most common errors are an unclosed quote or a missing semicolon in a configuration item that has been entered (e.g. location, username, or password).
Last edit: Paul 2016-04-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey guys! I found another error, which I cannot decipher - any help would be appreciated!
[Thu Jun 02 11:21:49.109049 2016] [:error] [pid 2007] [client 192.168.1.133:55739] PHP Fatal error: Uncaught Error: Call to undefined function simplexml_load_string() in /var/www/html/phpvirtualbox/endpoints/lib/language.php:73\nStack trace:\n#0 /var/www/html/phpvirtualbox/endpoints/language.php(15): __vbox_language->__construct()\n#1 {main}\n thrown in /var/www/html/phpvirtualbox/endpoints/lib/language.php on line 73, referer: http://192.168.1.103/phpvirtualbox/
In order to get phpVirtualBox 5.0.5 to work on Ubuntu 16.04 you need to do the following:
sudo apt-get install php-xml php-soap
sudo service apache2 restart # or similar for nginx or whtever other webserver you use
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using the release phpvirtualbox-4.3-3 and phpvirtualbox-5.0-4 but found that it couldn't work with PHP7 (I need PHP7 for my new project).
I tried to trace the code, and found that in file "lib/auth/Builtin.php" (of phpvirtualbox-4.3-3), the "break" statement at line 173 and line 181 have to change to "return". Next, need to installed package php-xml.x86_64 on my CentOS to enable SimpleXML. The login prompt is working afterwards but it still doesn't work after input the username and password with parse error at "lib/ajax.php". I didn't go further as I need to continue my work.
I am looking forward for phpVirtualBox to include support for PHP7 :)
Last edit: VCD 2015-12-09
After further tracing, in file "lib/ajax.php", line 304 should change from:
to
It seems phpVirtualBox is working correct after this change (together with other changes I mentioned in my early post).
Hope phpVirtualBox can include the change in the next release :)
New versions of phpVirtualBox have this code section in /endpoints/api.php instead of lib/ajax.php . VCD's suggestions above ending with adding {}s indeed did fix that line, and was enough to start the web-interface working again.
My system is:
Arch
extra/apache 2.4.18-1
extra/php 7.0.1-5
community/phpvirtualbox 5.0_3-1
You can find php errors, and thus other lines that need to fixed, on a default install as above here:
/var/log/httpd/error_log
In my case:
"
PHP Fatal error: Uncaught Error: Function name must be a string in /usr/share/webapps/phpvirtualbox/endpoints/api.php:316\nStack trace:\n#0 {main}\n thrown in /usr/share/webapps/phpvirtualbox/endpoints/api.php on line 316
"
Which I changed to:
Also you need to replace break with return in updateUser function
Thanks! I'll have this fixed in the next release.
OK, 5.0-5 (the latest release) supports php 7.
Thanks a lot for fixing this so quickly, and phpvirtualbox in general !
I have same problem in 5.0.5 not working with new ubuntu server 16.04 with php7...
An unknown PHP error occurred. This is most likely a syntax error in config.php in phpVirtualBox's folder. The most common errors are an unclosed quote or a missing semicolon in a configuration item that has been entered (e.g. location, username, or password).
Last edit: Paul 2016-04-24
Hey guys! I found another error, which I cannot decipher - any help would be appreciated!
Line 73 in the language.php reads this:
BR Kasper
Fix for above mentioned error was:
sudo apt-get install php-xml
Restart the servers and everything was working :)
Found the answer in another forum question! Have a nice day! WUHUU!
phpvirtualbox doesn't work with the last PHP update. Please fix it. Thanks
In order to get phpVirtualBox 5.0.5 to work on Ubuntu 16.04 you need to do the following:
sudo apt-get install php-xml php-soap
sudo service apache2 restart # or similar for nginx or whtever other webserver you use
doesn't work in php7. Any another ideas.
Ubuntu server+php7+phpvirtualbox5.05