Содержание
- phpVirtualBox Wiki
- A web-based front-end to VirtualBox written in PHP
- vboxweb-service Configuration in Linux
- Discussion
- phpvirtualbox: 500 Internal Server Error #229
- Comments
- Footer
- Cannot use phpvirtualbox anymore after update #219
- Comments
- Internal Server Error #3
- Comments
- Internal Server Error
phpVirtualBox Wiki
A web-based front-end to VirtualBox written in PHP
vboxweb-service Configuration in Linux
On Linux systems, VirtualBox creates the init script /etc/init.d/vboxweb-service when it is installed. This can be used to start and stop vboxwebsrv. While there may be numerous ways to configure this script, this document aims to keep it simple.
In order for vboxweb-service start vboxwebsrv, the file /etc/default/virtualbox must exist with correct settings. If this file does not exist on your system, create it now. This file has the format:
The following settings are available for use in this file:
Setting | Description |
---|---|
VBOXWEB_USER | The user as which vboxwebsrv will run. |
VBOXWEB_HOST | The host to bind to (localhost). |
VBOXWEB_PORT | The port to bind to (18083). |
VBOXWEB_TIMEOUT | Session timeout in seconds; 0 = disable timeouts (300). |
VBOXWEB_CHECK_INTERVAL | Frequency of timeout checks in seconds (5). |
VBOXWEB_THREADS | Maximum number of worker threads to run in parallel (100). |
VBOXWEB_KEEPALIVE | Maximum number of requests before a socket will be closed (100). |
VBOXWEB_LOGFILE | Name of file to write log to (no file). |
INSTALL_DIR | The location of the vboxwebsrv binary (/usr/lib/virtualbox). |
At a minimum, VBOXWEB_USER and VBOXWEB_HOST must be set.
VBOXWEB_USER should be set to the user that runs VirtualBox virtual machines on your system. If more than one user runs virtual machines, you will have to pick one (multiple instances are possible, but beyond the scope of this document).
VBOXWEB_HOST should, in most cases, be set to 127.0.0.1. If phpVirtualBox (your web server) is not running on the same host as vboxwebsrv and phpVirtualBox must communicate with vboxwebsrv over a network, this must be set to the external IP address of the host runing vboxwebsrv.
Your /etc/default/virtualbox may look like this:
.. or if your web server and vboxwebsrv are on NOT the same host:
Note that these values are just examples. The user that runs virtual machines on your system may not be named «vbox.»
Once this is done, you may start and stop vboxwebsrv by running:
/etc/init.d/vboxweb-service start
-or-
/etc/init.d/vboxweb-service stop
as the root user on your system.
Discussion
so far so good, vboxwebsrv up an running started by vboxweb.service, /etc/default/virtualbox and config.php defined but still the legendary error below. Any help would be much appreciated! Thanks!
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/
When I change from myipadrress to 127.0.0.1 and viceversa I get the login and enter admin/admin but get the error below. The vboxwebserver is up and the config.php is modified accordingly. What is wrong?
Oracle VM VirtualBox VM Selector v6.1.16_Ubuntu
PhpVirtualBox 5.0-5 2016-01-08
VBOXWEB_USER=brad
VBOXWEB_GROUP=vboxusers
VBOXWEB_HOST=127.0.0.1
PHP 7.4.9 (cli) (built: Oct 26 2020 15:17:14) ( NTS )
libapache2-mod-php7.4 is already the newest version (7.4.9-1ubuntu1.1).
vboxwebsrv is running and is listening:
tcp 0 0 127.0.0.1:18083 0.0.0.0:* LISTEN 0 727122 11337/vboxwebsrv
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
Details
readyState: «4»
responseText: «»
status: «500»
statusText: «Internal Server Error»
Источник
phpvirtualbox: 500 Internal Server Error #229
Hi, after the First installation, (this source: https://websiteforstudents.com/virtualbox-5-2-on-ubuntu-16-04-lts-server-headless/) and when I am trying to login tp phpvirtualbox with
http:// /phpvirtualbox/ I am having this error:
When I click details:
statusText: «Internal Server Error»
I can provide more info on demand.
Thanks!
The text was updated successfully, but these errors were encountered:
That’s a web-server error.
pgrep vboxwebsrv can tell you if it’s running.
apachectl -t might tell you more about apache config.
There seems to be no problem other than:
AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1. Set the ‘ServerName’ directive globally to suppress this message
Could this be the issue?
Depends on how you are setup.
Are you in a setup?
The www.example.com must resolve to the ip-address of your server.
@trasherdk I just type http://123.456.789.0/phpvirtualbox
In the search bar. (of course that ip is an example, not real ip of the server)
Okay. Edit http.conf and change ServerName to something sensible.
BTW. Upgrade your installation to something recent. Minimum 6.0.x
@trasherdk Ok, so VirtualBox version is 6.1 and I am not able to find the file http.conf
ServerName to something sensible.
Btw, what does something sensible mean?
And my system neither has http.conf or httpd.conf (in /etc/apache2/)
I’m not going to guess your setup.
So, unless you volunteer sufficient information, you’re on your own.
@trasherdk If you can define «sufficient information», I can help.
The value of ServerName is dependent of the ip-address of the server, and DNS , or lack of DNS, pointing to that server.
I have no clue as to which OS you are running, what version of web-server you are using, or what your general setup looks like.
Ubuntu Server 18.04 LTS headless, The server is local.
So, the conf file could be /etc/apache2/apache2.conf
Local ? Is that feet or kilometers? Local in relation to what?
When in a console, run hostname , that will give you the ta,ta .. hostname of the box.
then run host $(hostname) that should give you the IP-address of the box.
then host $(host $(hostname)) that should give you the hostname resolved to IP-address resolved back to hostname .
If that doesn’t work, edit your /etc/hosts file. man hosts tells you what to do.
I have the same problem.
I have a local server (dell with micro Xeon)
My So is ubuntu server 16.04 and apache
Host name is xxxx-xxxx and i run host $(hostname)
The result is host xxxx-xxxx not found : 3(NXDOMAIN)
any suggestion?
I am very new in linux
You don’t have valid DNS for your server.
echo -e «10.0.1.2tservername.example.comtservername» >> /etc/hosts
then host servername should return 10.0.1.2 .
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Cannot use phpvirtualbox anymore after update #219
I updated my NUC from Debian Stretch to Buster and therefore also updated VirtualBox — now running VirtualBox 6.0.14r133895
I was also able to start all the VMs via CLI and everything works.
Thing is: when I now access my PHPVirtualBox I only get this:
What could be the issue? How can I help you debugging?
Do I have to reinstall the whole PHPVirtualBox?
If that could help, could you link me how to do this?
The text was updated successfully, but these errors were encountered:
Check out this install for ubuntu what your debian for php may be missing.
Eduardo Lima Marcelino
I tried starting vboxweb as user vbox manually and then connect with phpvirtualbox, I get this, which looks fine so far:
vbox@Intel-NUC:/var/www/html/phpvirtualbox$ vboxwebsrv -H 127.0.0.1
Oracle VM VirtualBox web service Version 6.0.14
(C) 2007-2019 Oracle Corporation
All rights reserved.
00:00:00.004219 main VirtualBox web service 6.0.14 r133895 linux.amd64 (Oct 14 2019 15:00:23) release log
00:00:00.004273 main Log opened 2020-03-30T09:14:28.846552000Z
00:00:00.004284 main Build Type: release
00:00:00.004313 main OS Product: Linux
00:00:00.004316 main OS Release: 4.19.0-6-amd64
00:00:00.004319 main OS Version: #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11)
00:00:00.004496 main DMI Product Name:
00:00:00.004608 main DMI Product Version:
00:00:00.004745 main Host RAM: 2864MB (2.7GB) total, 136MB available
00:00:00.004754 main Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.004755 main Process ID: 17576
00:00:00.004757 main Package type: LINUX_64BITS__DEBIAN_10
00:00:00.031123 main IPC socket path: /tmp/.vbox-vbox-ipc/ipcd
00:00:00.103608 SQPmp Socket connection successful: host = 127.0.0.1, port = 18083, master socket = 8
00:00:02.937349 SQPmp Request 1 on socket 9 queued for processing (1 items on Q)
00:00:02.937427 SQPmp Request 2 on socket 10 queued for processing (2 items on Q)
00:00:02.937464 SQPmp Request 3 on socket 11 queued for processing (3 items on Q)
00:00:02.937496 SQPmp Request 4 on socket 12 queued for processing (4 items on Q)
00:00:02.937705 SQW01 New SOAP thread started
00:00:02.938753 SQPmp Request 5 on socket 13 queued for processing (5 items on Q)
00:00:02.938862 SQW01 Processing connection from IP=127.0.0.1 socket=9 (0 out of 1 threads idle)
00:00:02.939483 SQPmp Request 6 on socket 14 queued for processing (5 items on Q)
00:00:02.939869 SQW02 New SOAP thread started
00:00:02.940213 SQW02 Processing connection from IP=127.0.0.1 socket=10 (0 out of 2 threads idle)
00:00:02.952205 SQW02 External authentication library is ‘VBoxAuth’
00:00:03.125984 SQW02 Access for user ‘vbox’ granted
00:00:03.279011 SQW01 Access for user ‘vbox’ granted
00:00:03.341692 SQW01 Processing connection from IP=127.0.0.1 socket=11 (0 out of 2 threads idle)
00:00:03.347340 SQPmp Request 7 on socket 16 queued for processing (4 items on Q)
00:00:03.352958 SQW03 New SOAP thread started
00:00:03.353300 SQW03 Processing connection from IP=127.0.0.1 socket=12 (0 out of 3 threads idle)
00:00:03.550665 SQW01 Access for user ‘vbox’ granted
00:00:03.726861 SQW03 Access for user ‘vbox’ granted
00:00:03.735693 SQW01 Processing connection from IP=127.0.0.1 socket=13 (0 out of 3 threads idle)
00:00:04.060652 SQW01 Access for user ‘vbox’ granted
00:00:04.164297 SQW01 Processing connection from IP=127.0.0.1 socket=14 (0 out of 3 threads idle)
00:00:04.400104 SQW01 Access for user ‘vbox’ granted
00:00:04.427370 SQW01 Processing connection from IP=127.0.0.1 socket=16 (0 out of 3 threads idle)
00:00:04.639614 SQW01 Access for user ‘vbox’ granted
00:00:05.088789 Watchdog Statistics: 1 websessions, 10 references
The message in my phpvirtualbox says:
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
and when I click «details», I get:
readyState: «4»
responseText: «»
status: «500»
statusText: «Internal Server Error»
I also checked the config.php as the error states and compared it to the example: It is literally the same as the example except for the password for the user (which is correct — I tested it).
I don’t know where else to start debugging. Is there a more informative log for phpVirtualBox which clearly shows the problem instead of this web interface error message?
here was an error obtaining the list of registered virtual machines from VirtualBox.
That error is typically when your browser looses connection to your web-server.
Click OK, and click on the background, and it should refresh.
This assumes that you have a working setup already 💃
Yeah, well, I tried. Clicking OK or reloading the page does not provide any different result. :/
Well, you know the problem is between your web-server and vboxwebsrv , right?
I have a log-file in: /var/log/virtualbox/vboxweb.log . That’s where I’d start to look.
Next, web-server log-files: /var/log/httpd/error_log
Then, if it’s a virtualhost , those log-files..
Let’s see what you find..
The running instance of vboxwebsrv looks like this on my server:
Actually, the error:
Indicates a problem with a xmlhttprequest call.
Check your browsers dev-tools to monitor XHR requests.
Источник
Internal Server Error #3
I get the following error message in my terminal when I click the submit button.
- Running on http://127.0.0.1:5002/ (Press CTRL+C to quit)
127.0.0.1 — — [29/Sep/2016 15:53:10] «GET / HTTP/1.1» 200 —
127.0.0.1 — — [29/Sep/2016 15:53:13] «GET /showSignUp HTTP/1.1» 200 —
127.0.0.1 — — [29/Sep/2016 15:53:14] «GET /static/css/signup.css HTTP/1.1» 200 —
127.0.0.1 — — [29/Sep/2016 15:53:14] «GET /static/js/jquery-1.11.2.js HTTP/1.1» 200 —
127.0.0.1 — — [29/Sep/2016 15:53:14] «GET /static/js/signUp.js HTTP/1.1» 200 —
[2016-09-29 15:53:19,759] ERROR in app: Exception on /signUp [POST]
Traceback (most recent call last):
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflaskapp.py», line 1988, in wsgi_app
response = self.full_dispatch_request()
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflaskapp.py», line 1641, in full_dispatch_request
rv = self.handle_user_exception(e)
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflaskapp.py», line 1544, in handle_user_exception
reraise(exc_type, exc_value, tb)
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflask_compat.py», line 33, in reraise
raise value
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflaskapp.py», line 1639, in full_dispatch_request
rv = self.dispatch_request()
File «C:UsersTRAppDataLocalProgramsPythonPython35-32libsite-packagesflaskapp.py», line 1625, in dispatch_request
return self.view_functionsrule.endpoint
File «app.py», line 54, in signUp
cursor.close()
UnboundLocalError: local variable ‘cursor’ referenced before assignment
127.0.0.1 — — [29/Sep/2016 15:53:19] «POST /signUp HTTP/1.1» 500 —
The console in dev tools reads:
POST http://localhost:5002/signUp 500 (INTERNAL SERVER ERROR)send @ jquery-1.11.2.js:9659ajax @ jquery-1.11.2.js:9210(anonymous function) @ signUp.js:4dispatch @ jquery-1.11.2.js:4665elemData.handle @ jquery-1.11.2.js:4333
signUp.js:12 Object abort: ( statusText )always: ()complete: ()done: ()error: ()fail: ()getAllResponseHeaders: ()getResponseHeader: ( key )overrideMimeType: ( type )pipe: ( /* fnDone, fnFail, fnProgress / )progress: ()promise: ( obj )readyState: 4responseText: «↵ 500 Internal Server Error ↵
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
↵»setRequestHeader: ( name, value )state: ()status: 500statusCode: ( map )statusText: «INTERNAL SERVER ERROR»success: ()then: ( / fnDone, fnFail, fnProgress */ )proto: Object
The text was updated successfully, but these errors were encountered:
Источник
Groovy Gorilla
When I change from myipadrress to 127.0.0.1 and vice-versa I get the login and enter admin/admin but get the error below. The vboxwebserver is up and the config.php is modified accordingly. What is wrong?
Oracle VM VirtualBox VM Selector v6.1.16_Ubuntu
PhpVirtualBox 5.0-5 2016-01-08
etc/default/virtualbox:
LOAD_VBOXDRV_MODULE=1
VBOXWEB_USER=brad
VBOXWEB_GROUP=vboxusers
VBOXWEB_HOST=127.0.0.1
PHP 7.4.9 (cli) (built: Oct 26 2020 15:17:14) ( NTS )
libapache2-mod-php7.4 is already the newest version (7.4.9-1ubuntu1.1).
vboxwebsrv is running and is listening:
tcp 0 0 127.0.0.1:18083 0.0.0.0:* LISTEN 0 727122 11337/vboxwebsrv
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
Details
readyState: "4"
responseText: ""
status: "500"
statusText: "Internal Server Error"
the log file:
00:00:00.039894 main VirtualBox web service 6.1.16_Ubuntu r140961 linux.amd64 (Dec 17 2020 22:06:23) release log
00:00:00.039905 main Log opened 2021-02-19T01:02:40.234693000Z
00:00:00.039907 main Build Type: release
00:00:00.039913 main OS Product: Linux
00:00:00.039916 main OS Release: 5.8.0-31-generic
00:00:00.039918 main OS Version: #33-Ubuntu SMP Mon Nov 23 18:44:54 UTC 2020
00:00:00.039990 main DMI Product Name: HP 15 Notebook PC
00:00:00.040015 main DMI Product Version: 0974100002405F00000620180
00:00:00.040038 main Firmware type: BIOS
00:00:00.040172 main Host RAM: 3826MB (3.7GB) total, 1375MB available
00:00:00.040178 main Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.040179 main Process ID: 8869
00:00:00.040180 main Package type: LINUX_64BITS_GENERIC (OSE)
00:00:00.241060 main IPC socket path: /tmp/.vbox-root-ipc/ipcd
00:00:01.548109 SQPmp Socket connection successful: host = 127.0.0.1, port = 18083, master socket = 9
00:00:06.515677 Watchdog Statistics: 0 websessions, 0 references
00:01:41.836230 SQPmp Request 1 on socket 10 queued for processing (1 items on Q)
00:01:41.836325 SQW01 New SOAP thread started
00:01:41.836389 SQPmp Request 2 on socket 11 queued for processing (2 items on Q)
00:01:41.836429 SQW01 Processing connection from IP=127.0.0.1 socket=10 (0 out of 1 threads idle)
00:01:41.836902 SQPmp Request 3 on socket 12 queued for processing (2 items on Q)
00:09:25.294865 SQW03 Processing connection from IP=127.0.0.1 socket=10 (5 out of 6 threads idle)
netstat -plant|g 18083
tcp 0 0 127.0.0.1:18083 0.0.0.0:* LISTEN 10481/vboxwebsrv
tcp 0 0 127.0.0.1:37690 127.0.0.1:18083 ESTABLISHED 5649/apache2
tcp 0 0 127.0.0.1:18083 127.0.0.1:37690 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:18083 127.0.0.1:37678 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:37688 127.0.0.1:18083 ESTABLISHED 10960/apache2
tcp 0 0 127.0.0.1:18083 127.0.0.1:37680 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:18083 127.0.0.1:37686 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:37680 127.0.0.1:18083 ESTABLISHED 3224/apache2
tcp 0 0 127.0.0.1:37686 127.0.0.1:18083 ESTABLISHED 8957/apache2
tcp 0 0 127.0.0.1:18083 127.0.0.1:37688 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:18083 127.0.0.1:37682 ESTABLISHED 10481/vboxwebsrv
tcp 0 0 127.0.0.1:37682 127.0.0.1:18083 ESTABLISHED 10042/apache2
tcp 0 0 127.0.0.1:37678 127.0.0.1:18083 ESTABLISHED 9761/apache2
and then:
netstat -plant|g 18083
tcp 0 0 127.0.0.1:18083 0.0.0.0:* LISTEN 10481/vboxwebsrv
tcp 0 0 127.0.0.1:37708 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37718 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37720 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37704 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37722 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37710 127.0.0.1:18083 TIME_WAIT -
tcp 0 0 127.0.0.1:37724 127.0.0.1:18083 TIME_WAIT -
Uninstalled VB 6.1.16 and downloaded/installed VB 6.1.18.
Oracle VM VirtualBox VM Selector v6.1.18
and the vboxwebsrv.log is something like:
00:00:00.176230 main VirtualBox web service 6.1.18 r142142 linux.amd64 (Jan 7 2021 17:36:17) release log
00:00:00.176236 main Log opened 2021-02-28T15:32:53.971575000Z
00:00:00.176237 main Build Type: release
00:00:00.176242 main OS Product: Linux
00:00:00.176245 main OS Release: 5.8.0-31-generic
00:00:00.176248 main OS Version: #33-Ubuntu SMP Mon Nov 23 18:44:54 UTC 2020
00:00:00.176301 main DMI Product Name: HP 15 Notebook PC
00:00:00.176327 main DMI Product Version: 0974100002405F00000620180
00:00:00.176348 main Firmware type: BIOS
00:00:00.176456 main Host RAM: 3826MB (3.7GB) total, 1528MB available
00:00:00.176461 main Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.176462 main Process ID: 14689
00:00:00.176463 main Package type: LINUX_64BITS_UBUNTU_19_10
00:00:00.226365 main IPC socket path: /tmp/.vbox-brad-ipc/ipcd
00:00:03.740572 SQPmp Socket connection successful: host = 127.0.0.1, port = 18083, master socket = 9
00:00:08.662529 Watchdog Statistics: 0 websessions, 0 references
00:03:17.758674 SQPmp Request 1 on socket 10 queued for processing (1 items on Q)
00:03:17.758755 SQW01 New SOAP thread started
00:03:17.758904 SQW01 Processing connection from IP=127.0.0.1 socket=10 (0 out of 1 threads idle)
00:03:18.198560 SQW01 External authentication library is 'VBoxAuth'
00:03:18.728039 SQPmp Request 2 on socket 14 queued for processing (1 items on Q)
00:03:18.728124 SQW02 New SOAP thread started
00:03:18.728244 SQW02 Processing connection from IP=127.0.0.1 socket=14 (0 out of 2 threads idle)
00:03:18.931960 SQW01 Access for user 'brad' granted
00:03:19.032412 SQW02 Access for user 'brad' granted
00:03:19.088837 SQPmp Request 3 on socket 12 queued for processing (1 items on Q)
00:03:19.088946 SQW03 New SOAP thread started
00:03:19.089123 SQW03 Processing connection from IP=127.0.0.1 socket=12 (0 out of 3 threads idle)
00:03:19.195974 SQW03 Access for user 'brad' granted
00:03:19.409464 SQPmp Request 4 on socket 13 queued for processing (1 items on Q)
On Linux systems, VirtualBox creates the init script /etc/init.d/vboxweb-service when it is installed. This can be used to start and stop vboxwebsrv. While there may be numerous ways to configure this script, this document aims to keep it simple.
In order for vboxweb-service start vboxwebsrv, the file /etc/default/virtualbox must exist with correct settings. If this file does not exist on your system, create it now. This file has the format:
SETTING1=value SETTING2=value
The following settings are available for use in this file:
Setting | Description |
---|---|
VBOXWEB_USER | The user as which vboxwebsrv will run. |
VBOXWEB_HOST | The host to bind to (localhost). |
VBOXWEB_PORT | The port to bind to (18083). |
VBOXWEB_TIMEOUT | Session timeout in seconds; 0 = disable timeouts (300). |
VBOXWEB_CHECK_INTERVAL | Frequency of timeout checks in seconds (5). |
VBOXWEB_THREADS | Maximum number of worker threads to run in parallel (100). |
VBOXWEB_KEEPALIVE | Maximum number of requests before a socket will be closed (100). |
VBOXWEB_LOGFILE | Name of file to write log to (no file). |
INSTALL_DIR | The location of the vboxwebsrv binary (/usr/lib/virtualbox). |
At a minimum, VBOXWEB_USER and VBOXWEB_HOST must be set.
VBOXWEB_USER should be set to the user that runs VirtualBox virtual machines on your system. If more than one user runs virtual machines, you will have to pick one (multiple instances are possible, but beyond the scope of this document).
VBOXWEB_HOST should, in most cases, be set to 127.0.0.1. If phpVirtualBox (your web server) is not running on the same host as vboxwebsrv and phpVirtualBox must communicate with vboxwebsrv over a network, this must be set to the external IP address of the host runing vboxwebsrv.
Your /etc/default/virtualbox may look like this:
VBOXWEB_USER=vbox VBOXWEB_HOST=127.0.0.1
.. or if your web server and vboxwebsrv are on NOT the same host:
VBOXWEB_USER=remote_vbox VBOXWEB_HOST=192.168.0.4
Note that these values are just examples. The user that runs virtual machines on your system may not be named «vbox.»
Once this is done, you may start and stop vboxwebsrv by running:
/etc/init.d/vboxweb-service start
-or-
/etc/init.d/vboxweb-service stop
as the root user on your system.
hi all, I followed instructions on https://wiki.archlinux.org/index.php/VirtualBox for virtualbox and https://wiki.archlinux.org/index.php/PhpVirtualBox for phpvirtualbox. I have virtualbox working fine, I created virtual machines etc. Also vboxweb.service works fine, when i go to the login page it loads i enter the user name and password (admin/admin) then it gives an error:
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
Details
the details are
readyState: "4"
responseText: ""
status: "500"
statusText: "Internal Server Error"
the apache logs show this error:
PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function VBox_Enum::__construct(), 0 passed in /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxconnector.php on line 5448 and exactly 2 expected in /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxServiceWrappers.php:225nStack trace:n#0 /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxconnector.php(5448): VBox_Enum->__construct()n#1 /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxconnector.php(4117): vboxconnector->_mediumGetDetails(Object(IMedium))n#2 /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxconnector.php(951): vboxconnector->remote_vboxGetMedia(NULL)n#3 /usr/share/webapps/phpvirtualbox/endpoints/api.php(316): vboxconnector->__call('vboxGetMedia', Array)n#4 {main}n thrown in /usr/share/webapps/phpvirtualbox/endpoints/lib/vboxServiceWrappers.php on line 225, referer: https://10.0.0.3/phpvirtualbox/
some info on my system:
Linux fatzo 4.9.8-1-ARCH #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 x86_64 GNU/Linux
php 7.1.1-1
apache 2.4.25-1
virtualbox 5.1.14-1
phpvirtualbox 5.0_5-1
info on my config:
content of /etc/webapps/phpvirtualbox/config.php
<?php
/**
* phpVirtualBox example configuration.
* @version $Id: config.php-example 585 2015-04-04 11:39:31Z imoore76 $
*
* rename to config.php and edit as needed.
*
*/
class phpVBoxConfig {
/* Username / Password for system user that runs VirtualBox */
var $username = 'jody';
var $password = 'my_secret';
/* SOAP URL of vboxwebsrv (not phpVirtualBox's URL) */
var $location = 'http://localhost:18083/';
/* Default language. See languages folder for more language options.
* Can also be changed in File -> Preferences -> Language in
* phpVirtualBox.
*/
var $language = 'en';
/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */
var $vrdeports = '9000-9100';
/*
*
* Not-so-common options / tweaking
*
*/
// Multiple servers example config. Uncomment (remove /* and */) to use.
// Add ALL the servers you want to use. Even if you have the server set
// above. The default server will be the first one in the list.
/*
var $servers = array(
array(
'name' => 'London',
'username' => 'user',
'password' => 'pass',
'location' => 'http://192.168.1.1:18083/',
'authMaster' => true // Use this server for authentication
),
array(
'name' => 'New York',
'username' => 'user2',
'password' => 'pass2',
'location' => 'http://192.168.1.2:18083/'
),
);
*/
// Disable authentication
#var $noAuth = true;
// Host / ip to use for console connections
var $consoleHost = '10.0.0.3';
// Disable "preview" box
#var $noPreview = true;
// Default preview box update interval in seconds
var $previewUpdateInterval = 30;
// Preview box pixel width
var $previewWidth = 180;
// Max number of progress operations to keep in list
var $maxProgressList = 5;
// Change default preview aspect ratio to 1.
// http://www.wikipedia.org/wiki/Aspect_ratio_%28image%29#Previous_and_presently_used_aspect_ratios
#var $previewAspectRatio = 1.6;
// Enable custom VM icons
#var $enableCustomIcons = true;
/*
Exclusively use phpVirtualBox's groups configuration rather than VirtualBox groups.
This has the following effects:
*) Group changes made in phpVirtualBox will not be reflected in VirtualBox programs such as
VirtualBox and VBoxManage
*) Group changes will not affect which folder a VM is placed in
*) You can rename groups that contain running VMs and move / copy running VMs to groups
*/
#var $phpVboxGroups = true;
/*
Allow to prompt deletion hard disk files on removal from Virtual Media Manager.
If this is not set, files are always kept. If this is set, you will be PROMPTED
to decide whether or not you would like to delete the hard disk file(s) when you
remove a hard disk from virtual media manager. You may still choose not to delete
the file when prompted.
*/
var $deleteOnRemove = true;
/*
* File / Folder browser settings
*/
// Restrict file types
var $browserRestrictFiles = array('.iso','.vdi','.vmdk','.img','.bin','.vhd','.hdd','.ovf','.ova','.xml','.vbox','.cdr','.dmg','.ima','.dsk','.vfd');
// Restrict locations / folders
#var $browserRestrictFolders = array('D:\','C:\Users\Ian'); // Or something like array('/home/vbox','/var/ISOs')
// Force use of local, web server based file browser instead of going through vboxwebsrv
var $browserLocal = true;
// Disable file / folder browser.
#var $browserDisable = true;
// Disable Windows drive detection
var $noWindowsDriveList = true;
// Just list all drives from C: - Z: without checking if they exist or not.
// This may be required on older Windows systems with more than one drive.
#var $forceWindowsAllDriveList = true;
/*
* Misc
*/
/*
* Auto-refresh interval in seconds for VirtualBox host memory usage information.
* Any value below 3 will be ignored.
*/
var $hostMemInfoRefreshInterval = 5;
/* Show % of free host memory instead of % used */
#var $hostMemInfoShowFreePct = true;
/*
* VM Memory warnings.
*
* If $vmMemoryStartLimitWarn is enabled, each time a VM is started through
* phpVirtualBox, it will check that the available host memory is greater than
* the base and video memory of the VM + 50MB (a little bit of overhead). If it
* is not, a confirmation dialog will be presented to confirm that you want to
* start the VM.
*
* If $vmMemoryOffset is set (and $vmMemoryStartLimitWarn), $vmMemoryOffset
* megabytes is subtracted from the available host memory before the check is
* performed by $vmMemoryStartLimitWarn logic. For instance it may be a good
* idea to always have VM memory requirements + 100MB free. 100 is the default.
*/
#var $vmMemoryStartLimitWarn = true;
#var $vmMemoryOffset = 100;
/*
* Display guest additions version of a running VM on its Details tab
*/
#var $enableGuestAdditionsVersionDisplay = true;
/* Disable any of phpVirtualBox's main tabs */
#var $disableTabVMSnapshots = true; // Snapshots tab
#var $disableTabVMConsole = true; // Console tab
/* Screen resolutions for console tab */
var $consoleResolutions = array('640x480','800x600','1024x768','1280x720','1440x900');
/* Console tab keyboard layout. Currently Oracle's RDP client only supports EN and DE. */
var $consoleKeyboardLayout = 'EN';
/* Max number of network cards per VM. Do not set above VirtualBox's limit (typically 8) or below 1 */
var $nicMax = 4;
/* Enable advanced configuration items (normally hidden in the VirtualBox GUI)
* Note that some of these items may not be translated to languages other than English.
*/
var $enableAdvancedConfig = true;
/* Enable startup / shutdown configuration.
* This only works in linux and you must add the vboxinit file to
* your startup scripts list.
*/
#var $startStopConfig = true;
// Authentication library.
// var $authLib = 'Builtin';
// VM ownership
#var $enforceVMOwnership = true;
// Per-user VM quota
#var $vmQuotaPerUser = 2;
// Allow VDE network configuration. This must be supported by the underlying VirtualBox installation!
// If you do not know what VDE networking is - you do not need it, it is probably not supported by your
// VirtualBox installation and will cause errors if enabled.
#var $enableVDE = true;
// Disable setting SATA controllers port count to the max port number found when saving VMs.
#var $disableSataPortCount = true;
/* Enable Parallel Port configuration - EXPERIMENTAL
LPT support may or may not work for you.
!!! VirtualBox LPT support only works in Linux. !!!
*/
#var $enableLPTConfig = true;
/* Enable HardDisk IgnoreFlush configuration. This controls the "ExtraData" setting
* in "VBoxInternal/Devices/[controller type]/0/LUN#[x]/Config/IgnoreFlush". See
* Responding to guest IDE/SATA flush requests at:
* http://www.virtualbox.org/manual/ch12.html#idp12757424
*/
#var $enableHDFlushConfig = true;
/*
* Event listener timeout in seconds. This is an advanced option that most people will
* probably not need to change.
*/
#var $eventListenerTimeout = 20;
/* END SETTINGS */
}
?>
content of my /etc/httpd/conf/extra/phpvirtualbox.conf
Alias /phpvirtualbox "/usr/share/webapps/phpvirtualbox"
<Directory "/usr/share/webapps/phpvirtualbox">
Require all granted
php_admin_value open_basedir "/home/jody/VirtualBox VMs/:/srv/http/:/home/:/home/jody/:/home/vbox/:/tmp/:/usr/share/pear/:/usr/share/webapps/:/etc/webapps/:/etc/webapps/phpvirtualbox/:/usr/share/webapps/phpvirtualbox/"
AuthType Basic
AuthBasicProvider file
AuthName "nothing to see"
AuthUserFile /etc/srv/.htpasswd
Require valid-user
</Directory>
the service status of vboxweb.service:
● vboxweb.service - VirtualBox Web Service
Loaded: loaded (/usr/lib/systemd/system/vboxweb.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2017-02-12 17:24:50 UTC; 54min ago
Process: 4660 ExecStart=/usr/bin/vboxwebsrv --logfile /var/log/vbox.log --pidfile /run/vbox/vboxweb.pid --background (code=exited, status=0/SUCCESS)
Main PID: 4676 (vboxwebsrv)
Tasks: 25 (limit: 4915)
CGroup: /system.slice/vboxweb.service
├─4676 /usr/lib/virtualbox/vboxwebsrv --logfile /var/log/vbox.log --pidfile /run/vbox/vboxweb.pid --background
├─4678 /usr/lib/virtualbox/VBoxXPCOMIPCD
└─4684 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000185 main OS Release: 4.9.8-1-ARCH
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000186 main OS Version: #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000228 main DMI Product Name: To Be Filled By O.E.M.
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000240 main DMI Product Version: To Be Filled By O.E.M.
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000344 main Host RAM: 64398MB (62.8GB) total, 58100MB (56.7GB) available
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000360 main Executable: /usr/lib/virtualbox/vboxwebsrv
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000361 main Process ID: 4660
Feb 12 17:24:50 jody vboxwebsrv[4660]: 00:00:00.000362 main Package type: LINUX_64BITS_GENERIC (OSE)
Feb 12 17:24:50 jody systemd[1]: vboxweb.service: Supervising process 4676 which is not our child. We'll most likely not notice when it exits.
Feb 12 17:24:50 jody systemd[1]: Started VirtualBox Web Service.
how to get this fixed, searched around for a while but can’t find a solution, please help
Last edited by jody2 (2017-02-21 08:06:40)
Я попытался исправить это все утро, и я не могу найти какой-либо рабочий метод в Интернете.
Я пытаюсь выполнить простой запрос ajax для своего контроллера Laravel и получить данные, которые он отправляет. Я упростил его до максимума, и я все еще получаю ERROR 500 с данными «undefined».
- Laravel 5 TokenMismatchException на PHP 5.6.9
- Во время миграции база данных не настроена
- Laravel 5 добавить результаты запроса в foreach к массиву
- Можем ли мы интегрировать проект Laravel в библиотеку в CodeIgniter?
- Импортируйте CSV-файл в контроллер Laravel и вставьте данные в две таблицы
Кажется, что каждый пример onlines относится к Laravel 4.0, я не уверен, что они что-то изменили или нет, но никто не работает. Я также попытался изменить маршрут на «любой», и он работает с прямым доступом, но не с запросом ajax.
Благодарю.
Контроллер:
<?php namespace AppHttpControllers; use Session, DB, Request; class AjaxController extends Controller { public function question() { print_r("Made It"); die(); } }
Маршрут:
Route::post('/ajax/question', 'AjaxController@question');
Javascript:
$.ajax({ url: "/ajax/question", method: 'POST', data: { 'answered': '1' }, processData: false, contentType: false, cache: false, success: function(data) { console.log(data); console.log("success"); }, error: function(data) { console.log(data); console.log("error"); } });
console.log (data) дает следующее:
readyState 4 responseText "" status 500 statusText "Internal Server Error" abort function(e) always function() complete function() done function() error function() fail function() getAllResponseHeaders function() getResponseHeader function(e) overrideMimeType function(e) pipe function() progress function() promise function(e) setRequestHeader function(e, t) state function() statusCode function(e) success function() then function()
егоreadyState 4 responseText "" status 500 statusText "Internal Server Error" abort function(e) always function() complete function() done function() error function() fail function() getAllResponseHeaders function() getResponseHeader function(e) overrideMimeType function(e) pipe function() progress function() promise function(e) setRequestHeader function(e, t) state function() statusCode function(e) success function() then function()
EDIT: Если я изменил запрос на GET, он работает правильно. (Настроить маршрут на любой)
- Динамическая маршрутизация в приложении Laravel 5
- Laravel — как передать параметр маршруту? Есть ли более эффективная практика?
- Настройка базы данных тестирования для приемочных тестов в Codeception (Laravel)
- Оператор вопросительной метки в запросе
- Laravel 5.2 — Проверка с помощью API