Goodmorning,
I am trying to use phpVirtualBox on Arch Linux, but It does not work. Here is what I have done.
I installed virtualbox (5.0.24-1), php (7.0.8-1), apache (2.4.23-1), and phpvirtualbox (5.0_5-1) using pacman (Arch Linux package manager).
I added to apache configuration (httpd.conf) the example configuration found in /etc/webapps/phpvirtualbox. Here is the content:
Alias /phpvirtualbox "/usr/share/webapps/phpvirtualbox"
<Directory"/usr/share/webapps/phpvirtualbox">
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
This apache setting works because I can connect to phpvirtualbox.
When I load phpvirtualbox index, a message appears:
*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). Depending on your PHP configuration, navigating directly to config.php in your web browser may display the PHP error message. If find that this is not the case, or have no idea what this error message means, please raise the issue at http://sourceforge.net/p/phpvirtualbox/discussion/help/ *
I checked config.php and there is no error.
I created the user who runs phpvirtualbox and his home directory (using useradd package).
Is it possibile that apache alias doesn't work properly for phpvirtualbox? If not, how can I solve the problem?
I can confirm this issue. I have experience the same behavior on a freshly installed Ach Linux Host.
First I took phpvirtualbox from the Arch Repository. When I got stuck on the error message as described above, I decided to use the app from the git repository. But that made no difference, the error still popups.
I did a telnet to my vboxwebsrv and that is working. I also see in the logfile of the vboxwebsrv that it has a connection active. Also the service runs under the vbox user. So that is excluded I think, that the error sits here.
The phpvirtualbox web app has the right permissions I think. Apache is running in my configuration under user and group http. PHP is also fine tuned by the recommendations on the phpvirtualboxwebsite. I also can work on the commandline with VBoxManage under the vbox user. So there is no problem either.
I don't think the problem is in the code of phpvirtualbox, but it is rather a Arch Linux and Apache issue. Am kinda stuck now.
Last edit: A.R. Winters 2016-07-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Find the solution, As I thought there must be someting wrong with the Arch Linux and Apache configuration. I forgot to install this package php-apache. Also check your httpd.conf in specific the php settings. Go to this website for the right php settings that have to be set in the http.conf. https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP
Last edit: A.R. Winters 2016-07-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Goodmorning,
I am trying to use phpVirtualBox on Arch Linux, but It does not work. Here is what I have done.
I installed virtualbox (5.0.24-1), php (7.0.8-1), apache (2.4.23-1), and phpvirtualbox (5.0_5-1) using pacman (Arch Linux package manager).
I added to apache configuration (httpd.conf) the example configuration found in /etc/webapps/phpvirtualbox. Here is the content:
This apache setting works because I can connect to phpvirtualbox.
When I load phpvirtualbox index, a message appears:
*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). Depending on your PHP configuration, navigating directly to config.php in your web browser may display the PHP error message. If find that this is not the case, or have no idea what this error message means, please raise the issue at http://sourceforge.net/p/phpvirtualbox/discussion/help/ *
I checked config.php and there is no error.
I created the user who runs phpvirtualbox and his home directory (using useradd package).
Is it possibile that apache alias doesn't work properly for phpvirtualbox? If not, how can I solve the problem?
If you need other information ask me for it.
Edit: I also done what you can find here: https://sourceforge.net/p/phpvirtualbox/wiki/Home/#arch-linux-considerations but I still get the error message.
Last edit: Luca Bertoni 2016-07-10
I can confirm this issue. I have experience the same behavior on a freshly installed Ach Linux Host.
First I took phpvirtualbox from the Arch Repository. When I got stuck on the error message as described above, I decided to use the app from the git repository. But that made no difference, the error still popups.
I did a telnet to my vboxwebsrv and that is working. I also see in the logfile of the vboxwebsrv that it has a connection active. Also the service runs under the vbox user. So that is excluded I think, that the error sits here.
The phpvirtualbox web app has the right permissions I think. Apache is running in my configuration under user and group http. PHP is also fine tuned by the recommendations on the phpvirtualboxwebsite. I also can work on the commandline with VBoxManage under the vbox user. So there is no problem either.
I don't think the problem is in the code of phpvirtualbox, but it is rather a Arch Linux and Apache issue. Am kinda stuck now.
Last edit: A.R. Winters 2016-07-27
Find the solution, As I thought there must be someting wrong with the Arch Linux and Apache configuration. I forgot to install this package php-apache. Also check your httpd.conf in specific the php settings. Go to this website for the right php settings that have to be set in the http.conf. https://wiki.archlinux.org/index.php/Apache_HTTP_Server#PHP
Last edit: A.R. Winters 2016-07-27