Форум русскоязычного сообщества Ubuntu


Следите за новостями русскоязычного сообщества Ubuntu в Twitter-ленте @ubuntu_ru_loco

Автор Тема: Ubuntu Server 22.0.4 + PHPVirualBox 7.0.8 и PHP8.1 нет доступа к файлам.  (Прочитано 5702 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн Dimasik-m

  • Автор темы
  • Любитель
  • *
  • Сообщений: 78
    • Просмотр профиля
Всех приветствую. Столкнулся с некоторой проблемой во время работы с PHPVirtualBox.
А именно - нет возможности просмотра файлов при создании виртуальной машины, выборе образа и т.д.
Выглядит это так:

Колечко крутиться бесконечно. И такое происходит везде где нужно что-то выбрать получив доступ к файловой системе.
Кроме одного меню - Экспорт конфигураций. В меню я доступ к файлам получаю:

Почитав кучу форумов я понял что виноват в этом скорее всего сам PHPvirualbox, что свежие версии всегда у всех глючат.
Но может все, кто сталкивался с подобным? Как решить? Куда копать?
Буду рад любой помощи/совету/мысли. Кроме наверное предложению в стиле "поставь нормальную версию, поставь другую ОС, и вообще зачем тебе все это?" :coolsmiley:

root@srv:/# php --version
PHP 8.1.2-1ubuntu2.11 (cli) (built: Feb 22 2023 22:56:18) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.11, Copyright (c), by Zend Technologies

root@srv:/# vboxwebsrv
Oracle VM VirtualBox web service Version 7.0.8
Copyright (C) 2007-2023 Oracle and/or its affiliates
00:00:00.000111 main     VirtualBox web service 7.0.8 r156879 linux.amd64 (Apr 17 2023 18:04:45) release log
00:00:00.000116 main     Log opened 2023-06-06T12:31:31.753093000Z
00:00:00.000117 main     Build Type: release
00:00:00.000120 main     OS Product: Linux
00:00:00.000121 main     OS Release: 5.15.0-73-generic
00:00:00.000122 main     OS Version: #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023
00:00:00.000172 main     DMI Product Name: ProLiant DL360 G7
00:00:00.000184 main     DMI Product Version:
00:00:00.000202 main     Firmware type: BIOS
00:00:00.000255 main     Host RAM: 32137MB (31.3GB) total, 27857MB (27.2GB) available
00:00:00.000259 main     Executable: /usr/lib/virtualbox/vboxwebsrv
00:00:00.000260 main     Process ID: 141480
00:00:00.000260 main     Package type: LINUX_64BITS_UBUNTU_22_04
00:00:00.037289 main     IPC socket path: /tmp/.vbox-root-ipc/ipcd
00:00:00.331552 SQPmp    Socket connection successful: host = default (localhost), port = 18083, master socket = 8
00:00:01.176625 SQPmp    Request 1 on socket 9 queued for processing (1 items on Q)
00:00:01.176686 SQW01    New SOAP thread started
00:00:01.176782 SQW01    Processing connection from IP=127.0.0.1 socket=9 (0 out of 1 threads idle)
00:00:01.179711 SQW01    External authentication library is 'true'



root@srv:/# cat /1/www/vbox7.0/config.php
<?php
/**
 * phpVirtualBox example configuration.
 * [member=196430]Version[/member] $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 = &#39;vbox&#39;;
var $password = &#39;vbox&#39;;

/* SOAP URL of vboxwebsrv (not phpVirtualBox&#39;s URL) */
var $location = &#39;http://127.0.0.1:18083/&#39;;

/* Default language. See languages folder for more language options.
 * Can also be changed in File -> Preferences -> Language in
 * phpVirtualBox.
 */
var $language = &#39;ru&#39;;

/* Set the standard VRDE Port Number / Range, e.g. 1010-1020 or 1027 */
var $vrdeports = &#39;9000-9100&#39;;

/*
 *
 * 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(
                &#39;name&#39; => &#39;London&#39;,
                &#39;username&#39; => &#39;user&#39;,
                &#39;password&#39; => &#39;pass&#39;,
                &#39;location&#39; => &#39;http://192.168.1.1:18083/&#39;,
                &#39;authMaster&#39; => true // Use this server for authentication
        ),
        array(
                &#39;name&#39; => &#39;New York&#39;,
                &#39;username&#39; => &#39;user2&#39;,
                &#39;password&#39; => &#39;pass2&#39;,
                &#39;location&#39; => &#39;http://192.168.1.1:18083/&#39;
        ),
);
*/

// Disable authentication
#var $noAuth = true;

// Host / ip to use for console connections
var $consoleHost = &#39;192.168.1.1&#39;;

// 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&#39;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(&#39;.iso&#39;,&#39;.vdi&#39;,&#39;.vmdk&#39;,&#39;.img&#39;,&#39;.bin&#39;,&#39;.vhd&#39;,&#39;.hdd&#39;,&#39;.ovf&#39;,&#39;.ova&#39;,&#39;.xml&#39;,&#39;.vbox&#39;,&#39;.cdr&#39;,&#39;.dmg&#39;,&#39;.ima&#39;,&#39;.dsk&#39;,&#39;.vfd&#39;);

// Restrict locations / folders
#var $browserRestrictFolders = array(&#39;D:\\&#39;,&#39;C:\\Users\\Ian&#39;); // Or something like array(&#39;/home/vbox&#39;,&#39;/var/ISOs&#39;)

// 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&#39;s main tabs */
#var $disableTabVMSnapshots = true; // Snapshots tab
#var $disableTabVMConsole = true; // Console tab

/* Screen resolutions for console tab */
var $consoleResolutions = array(&#39;640x480&#39;,&#39;800x600&#39;,&#39;1024x768&#39;,&#39;1280x720&#39;,&#39;1440x900&#39;);

/* Console tab keyboard layout. Currently Oracle&#39;s RDP client only supports EN and DE. */
var $consoleKeyboardLayout = &#39;EN&#39;;

/* Max number of network cards per VM. Do not set above VirtualBox&#39;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 = &#39;Builtin&#39;;

// 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  */


}

Пользователь добавил сообщение 06 Июня 2023, 17:15:23:
В общем нашел ответ и решение проблемы совсем случайно))
Вот решение - https://github.com/phpvirtualbox/phpvirtualbox/issues/273
Во вложении уже готовый файл.
« Последнее редактирование: 06 Июня 2023, 17:15:23 от Dimasik-m »

 

Страница сгенерирована за 0.042 секунд. Запросов: 24.