Tag: software errors / problem solutions

Windows stopped booting in Virtual Machine after upgrading to VirtualBox 7 (SOLVED)

After upgrading to VirtualBox 7 (more precisely, to VirtualBox 7.0.2), the Windows 11 guest OS stopped booting.

Windows 11 guest boot starts as usual, no errors are displayed. Moreover, you can hear the Windows logon sound, but the desktop is not shown.

Boot freezes on the initial screen with UEFI messages.

As a host (main) OS, I use Linux, namely Arch Linux.

The problem was solved in the following way:

1. Shut down the guest OS

2. Go to its settings → Display.

Uncheck “Enable 3D Acceleration”.

3. Boot guest OS with Windows as usual

4. Update Guest Additions.

5. After that, you can again activate the “Enable 3D Acceleration” setting – the guest system will boot without errors.

Hangups while updating Guest Additions

One of the innovations of VirtualBox 7 is the automatic updating of the Guest Addition.

But in my case, after inserting Guest Additions CD image, an error occurred and the virtual computer hung.

In addition to the problem discussed just above, I noticed that the Windows guest OS, after inserting the “Guest Additions CD image”, tried to update them on its own. This led to endless freezes and the need to force a reboot of the guest OS.

Finally, the problem was solved in the following way:

1. Remove Guest Additions (if your guest OS keeps freezing then boot into safe mode)

2. Restart your computer

3. Reinstall the Guest Additions

4. Restart the computer again

Should I upgrade to VirtualBox 7?

At the time of writing, the latest stable version is VirtualBox 7.0.2, which was released just a few days after the release of the first stable version of VirtualBox 7.

However, according to my observations, Windows 11 is still unstable in VirtualBox 7.0.2.

Although VirtualBox 7 brings significant updates, they are not in demand by most users who run virtual machines in VirtualBox. If you do not see anything important in the changelog in VirtualBox 7, then I would recommend waiting a few months before upgrading. During this time, more problems and bugs will be fixed.

See also: Some program areas become transparent or invisible in guest OS Windows after upgrading to VirtualBox 7 (SOLVED)

phpMyAdmin error “Error: Undefined constant “SODIUM_CRYPTO_SECRETBOX_KEYBYTES”” (SOLVED)

On Arch Linux, when trying to use the phpMyAdmin 5.3 pre-release, I encountered an error:


Checking in Debian showed that there is no such problem with phpMyAdmin 5.3.

The reason for the error is that sodium support is not enabled.

How to enable sodium on Arch Linux (Manjaro, BlackArch)

To enable sodium support in Arch Linux and derivative distributions (Manjaro, BlackArch) follow these steps.

Install the php-sodium package:

sudo pacman -S php-sodium

Open the /etc/php/php.ini file:

sudo gedit /etc/php/php.ini

Find the line in it


and uncomment it to get:


Restart the web server for the changes to take effect:

sudo systemctl restart httpd.service

This will enable sodium support and the error in phpMyAdmin 5.3 will disappear.

Error “error: GPGME error: No data. error: failed to synchronize all databases (unexpected error)” (SOLVED)

When updating the package cache with the pacman package manager, for example, when running the following command to update package information and update the system:

sudo pacman -Syu

An error may occur:

error: GPGME error: No data
:: Synchronizing package databases...
 core                  155.5 KiB   444 KiB/s 00:00 [######################] 100%
 extra is up to date
 community is up to date
 multilib is up to date
 blackarch is up to date
error: GPGME error: No data
error: failed to synchronize all databases (unexpected error)

To fix the error, run the following command:

sudo rm -R /var/lib/pacman/sync

And then run the system update command again:

sudo pacman -Syu

This time the error should be gone.

Cause “error: GPGME error: No data. error: failed to synchronize all databases (unexpected error)” may be the following situation: you have exhausted the limit of your Internet connection and instead of the requested data, your Internet provider shows its page with information about the need to replenish the balance. As a result, incorrect data is sent in response to outgoing Internet connections, although the connection is successful from the point of view of the computer.

That is, pacman asks for information about the packages, but the ISP sends the data to show the Captive Portal. As a result of this, pacman has the indicated error. To fix it, you need to delete the cached data, which is done by the above command.

How to downgrade to a previous kernel version in Arch Linux. How to install and switch to linux-lts

New Linux kernels bring support for new hardware and new features. But sometimes the kernel causes problems: it is completely or partially incompatible with existing software, especially video drivers suffer from this, but this can also apply to any other software, for example, VirtualBox.

At the time of the release of the linux 5.9 kernel, NVIDIA drivers were partially incompatible with it, as a result, their important functionality was lost. Although the graphics card worked, but CUDA, OpenCL and probably other features are broken. Of course, this was fixed pretty quickly, but what about those who needed CUDA and OpenCL or other programs that were incompatible with the latest version of the Linux kernel at the time of the problem?

A very recent example, the linux 5.19 kernel at the time of writing is not compatible with the latest version of VirtualBox, which just doesn't work. The problem will be fixed in the near future, but what if you need running VirtualBox machines right now?

One option is to rollback to a previous version by installing it from the downloaded package cache. The method is not the most pleasant, since it will be necessary to prohibit updating the package, the version of which was rolled back, or even refuse to update the entire system.

This method is especially annoying when it comes to the linux kernel – you also need to do something with dependencies.

One of the easier options is to switch to the linux-lts kernel.

How to install linux-lts

LTS – stands for Long Time Support. Simply put, this is a Linux kernel and modules from one of the previous versions, which is rarely updated.

This kernel can be installed as a regular package, replacing the existing kernel. Depending on your computer configuration, you may need to install other *-lts packages, such as the nvidia-lts package, an NVIDIA video driver for the linux-lts kernel.

Also install linux-lts-headers.

All these packages can be installed with the command:

sudo pacman -S linux-lts linux-lts-headers nvidia-lts

Please note that it is not required to remove the old kernel and also the NVIDIA drivers (although you can do this if you wish).

How to switch to linux-lts kernel. Boot options update

In order to use the linux-lts kernel, you need to change the boot options.

Changing boot options is done differently depending on whether you are using GRUB or systemd-boot.

If you are unsure, see “How to check if a computer is using BIOS or UEFI; GRUB or systemd-boot bootloader; MBR or GPT partition table”.

Update boot options for systemd-boot

Open file /boot/loader/entries/arch.conf

sudo vim /boot/loader/entries/arch.conf


sudo gedit /boot/loader/entries/arch.conf

And replace the lines in it

linux   /vmlinuz-linux
initrd  /initramfs-linux.img

On the

linux   /vmlinuz-linux-lts
initrd  /initramfs-linux-lts.img

For example, the full content of my file was

title	BlackArch
linux   /vmlinuz-linux-lts
initrd  /initramfs-linux-lts.img
options	root=/dev/nvme0n1p2 rw

I commented out the lines that point to the normal kernel version and added the lines that point to linux-lts:

title	BlackArch
#linux	/vmlinuz-linux
#initrd	/initramfs-linux.img
linux   /vmlinuz-linux-lts
initrd  /initramfs-linux-lts.img
options	root=/dev/nvme0n1p2 rw

Then reboot and make sure you are using the LTS kernel version with the command:

uname -a

Update Boot Options for GRUB

Update your GRUB configuration:

sudo grub-mkconfig -o /boot/grub/grub.cfg

Then reboot and make sure you are using the LTS kernel version with the command:

uname -a

After the kernel has been improved and the problems that are bothering you are fixed, you can return to the latest version of the Linux kernel.

Analogue of Add-Computer in PowerShell 7



Testing with PowerShell 7.3.0-preview.5 shows that Add-Computer is back!


Get-Command -module Microsoft.PowerShell.Management

outputs the following:

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Function        Add-Computer                                       1.0        Microsoft.PowerShell.Management

That is, Add-Computer is present, it is a function (not a cmdlet), the version is indicated as 1.0. The status of Add-Computer is not completely clear: is it a temporary hotfix or a gradual return of the cmdlet?


Add a computer to a domain or workgroup in PowerShell

The Add-Computer cmdlet joins a computer to a Windows Domain or to a Workgroup. The Add-Computer cmdlet adds the local computer or remote computers to a domain or workgroup, or moves them from one domain to another. It also creates a domain account if the computer is added to the domain without an account. You can use the parameters of this cmdlet to specify an organizational unit (OU) and domain controller or to perform an unsecure join.

An example of a command that adds the local computer to the domain and restarts the computer:

Add-Computer -DomainName Domain01 -LocalCredential Domain01\Administrator -Restart

The following command adds the local computer to the workgroup, or renames the workgroup (if the computer is already in a workgroup with a different name):

Add-Computer -WorkgroupName WORKGROUP-A

These commands work fine in PowerShell 5, which is built in by default in all versions of Windows up to Windows 11 and all server versions up to Windows Server 2022.

See also: How to check PowerShell version in Windows 11

Error “Add-Computer: The term 'Add-Computer' is not recognized as a name of a cmdlet, function, script file, or executable program.”

But in PowerShell 7, this command is missing:

Add-Computer: The term 'Add-Computer' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggestion [4,General]: The most similar commands are: Add-Computer, Stop-Computer, Get-ADComputer, New-ADComputer, Set-ADComputer, Add-Content, Rename-Computer, Add-Member.

You can verify that the command named Add-Computer is indeed present in PowerShell 5, where it is placed in the Microsoft.PowerShell.Management module:

Get-Command -Module Microsoft.PowerShell.Management -Name *Computer* | Select Name

But Add-Computer is missing from PowerShell 7:

Get-Command -Module Microsoft.PowerShell.Management -Name *Computer* | Select Name

You can count exactly how many commands are removed from the Management module when moving from PowerShell 5 to PowerShell 7:

Get-Command -Module Microsoft.PowerShell.Management | Measure-Object | select Count

Get-Command -Module Microsoft.PowerShell.Management | Measure-Object | select Count

There were 89 command, 61 commands remained.

How to replace Add-Computer in PowerShell 7

One of the suggested alternatives seems to be the New-ADComputer cmdlet, but the documentation explicitly says that “This cmdlet does not join a computer to a domain”.

There is no information about where the Add-Computer cmdlet or what its alternative is in PowerShell.

One working solution, if you've already installed PowerShell 7, is to run the join Domain or Workgroup command in PowerShell 5. To do this, run the following sequence of commands:

Add-Computer -DomainName Domain01 -LocalCredential Domain01\Administrator -Restart

See also: How to install the latest PowerShell on Windows 11

error: blackarch: signature from “Levon ‘noptrix’ Kayan (BlackArch Developer) ” is invalid (SOLVED)

When trying to update Arch Linux with BlackArch repositories with the command

sudo pacman -Syu

an error occurred:

error: blackarch: signature from "Levon 'noptrix' Kayan (BlackArch Developer) <noptrix@nullsecurity.net>" is invalid

The error message says that the signature of one of the BlackArch developers is not valid.

To solve this error, just delete the /var/lib/pacman/sync/blackarch.db.sig file:

sudo rm /var/lib/pacman/sync/blackarch.db.sig

Then run the update as usual:

sudo pacman -Syu

The error no longer occurs:

I don't know exactly what caused this problem, perhaps a file corruption due to a network problem during a system update.

After updating the information from the package repositories, the /var/lib/pacman/sync/blackarch.db.sig file was recreated and the error no longer occurred. That is, there is no need to worry that your Linux will lose any functionality.

VirtualBox Error “NS_ERROR_FAILURE (0x80004005)” (SOLVED)

After updating VirtualBox, all virtual machines stopped working, regardless of the guest operating system and their settings.

The situation is complicated by the fact that instead of an exact indication of the problem, when trying to start the virtual machine, only a general message is displayed that the session was terminated, as well as an error number, which is common to a number of errors related to the inability to start the virtual machine session.

Full text of the error:

The VM session was aborted.

Result Code: 
NS_ERROR_FAILURE (0x80004005)
ISession {c0447716-ff5a-4795-b57a-ecd5fffa18a4}

One possible reason is a mismatch between the versions of the VirtualBox Extension Pack and the installed version of VirtualBox.

VirtualBox Extension Pack is an extension that adds features such as support for USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards.

To make sure that the reason is in the VirtualBox Extension Pack, you can disable the functions that the extension pack provides in the virtual machine settings (for example, rollback to USB 1.1 version) – after that the virtual machine should work without errors. Or go straight to updating the extension pack, which will solve the indicated problem.

To fix this problem, just install the version of the VirtualBox Extension Pack that matches the version of your VirtualBox.

If you installed the extension pack manually, then go to the VirtualBox download page https://www.virtualbox.org/wiki/Downloads and find the VirtualBox Oracle VM VirtualBox Extension Pack there.

Download and run the file by double clicking.

During the installation of the new version, you will be prompted to uninstall the old version.

The Linux repositories also contain the VirtualBox Extension Pack.

On Debian and derivative distributions (Linux Mint, Ubuntu, Kali Linux and others), to install the VirtualBox Extension Pack from the repository, run:

sudo apt install virtualbox-ext-pack

On Arch Linux and derivative distributions (Manjaro, BlackArch and others), to install the VirtualBox Extension Pack from the repository, run:

pikaur -S virtualbox-ext-oracle

If you get a message that the pikaur command was not found, then see the article “Automatic installation and update of AUR packages”.

If you receive an error that the VirtualBox Extension Pack is already installed, for example:

VBoxManage: error: Extension pack 'Oracle VM VirtualBox Extension Pack' is already installed. In case of a reinstallation, please uninstall it first

Then you need to start by removing it manually. To do this, open VirtualBox, go to the menu File → Preferences → Extensions.

Uninstall VirtualBox Extension Pack.

After that, restart the installation of the VirtualBox Extension Pack from the repository.

After updating the VirtualBox Extension Pack, the “NS_ERROR_FAILURE (0x80004005)” error is gone.

magick and convert troubleshooting (ImageMagick package)

The magick (convert) utilities from the ImageMagick package are used to convert and modify images. The magick (convert) commands have many options, although in their basic use, for example, to convert from one format to another, you can do without options at all.

Despite the seeming ease of using the magick (convert) utilities, when using them, I encountered a variety of errors, the cause of which was the unintuitive command syntax.

For details on installing ImageMagick, including which dependencies need to be installed to support the maximum number of formats, see the article: ImageMagick guide: installing, using, and troubleshooting.

How to fix “magick: command not found”

If you encounter an error that the magick command is not found, then this means that:

  • imagemagick package not installed
  • installed imagemagick 6 or earlier

At the time of writing, the current version of ImageMagick is 7.*. But Debian and all derivative distributions use ImageMagick 6.*, which does not have the “magick” program. Therefore, if you get an error that the “magick: command found”, use the “convert” command instead.

magick: no images found for operation… (SOLVED)

Next command:

magick -motion-blur 10 IMAGE.jpg OUTPUT.jpg

will throw an error:

magick: no images found for operation `-motion-blur' at CLI arg 1 @ error/operation.c/CLIOption/5414.

The essence of the error is that no images were found for the specified operator. At the same time, as you can see, the command specifies the input image to convert (IMAGE.jpg) and the name of the output image (test.jpg).

To understand the cause of the error, let's look at the syntax of the magick command:


That is, the magick utility distinguishes between “input file options” and “output file options”. Moreover, almost all options are OUTPUT-OPTIONS. The exceptions, i.e. INPUT-OPTIONS, are -antialias, -caption, -density, -define, -encoding, -font, -pointsize, -size, and -texture, as well as the options from the “Miscellaneous options” section.

That is, to fix this error, it is enough to move the option, placing it between the names of the input and output files. The following command will not throw an error:

magick IMAGE.jpg -motion-blur 10 OUTPUT.jpg

magick: missing output filename `-identify' … (SOLVED)

The following command is supposed to display detailed information about the IMAGE.jpg file:

magick IMAGE.jpg -identify -verbose

But instead it throws an error:

magick: missing output filename `-identify' at CLI arg 3 @ error/magick-cli.c/ProcessCommandOptions/524.

The essence of the error is that the name of the output file is missing. Although the -identify and -verbose options do not imply any processing of the file, in order to fix the indicated error, you must specify the output file:

magick IMAGE.jpg -identify -verbose ANY.jpg

magick: MissingArgument … (SOLVED)

In the following command, despite the correct placement of the option between the filenames, it produces an error:

magick IMAGE.jpg -posterize OUTPUT.jpg

Error text:

magick: MissingArgument `-posterize' at CLI arg 2 @ fatal/magick-cli.c/ProcessCommandOptions/447.

The reason for the error is that there is no argument for the option being used. To find out exactly what argument an option expects, see the help. In this case, the number of color levels is expected. The following command will run without error:

magick IMAGE.jpg -posterize 2 OUTPUT.jpg

magick: unrecognized option `-channel-extract'… (SOLVED)

In the following command, the option is placed between the filenames, the option has an argument:

magick IMAGE.jpg -channel-extract 10 OUTPUT.jpg

But, nevertheless, the execution of the command ends with an error:

magick: unrecognized option `-channel-extract' at CLI arg 2 @ fatal/magick-cli.c/ProcessCommandOptions/428.

The essence of the error is that the option is not recognized. If the option is not recognized, then first check the spelling of it. If an option is spelled correctly but not recognized, then that option is obsolete and has been deprecated (deleted). According to my observations, the help output by the command

man magick

although it is generally up-to-date, it contains several obsolete options.

The official online help for “magick” options is on the following page: https://imagemagick.org/script/magick.php

The option does not work, but no errors are shown

Consider the following command:

magick IMAGE.jpg -rotate 30 -background red test8.jpg

As planned, the image should be rotated by 30 degrees, and the empty corners that appear should be filled with red. As a result of executing the command, the image will indeed be rotated, but the corners will remain white.

To fix the error, you must specify the -background option first. The following command will work exactly as intended:

magick IMAGE.jpg -background red -rotate 30 test8.jpg

Error “convert: delegate failed `’potrace’ --svg --output ‘%o’ ‘%i” @ error/delegate.c/InvokeDelegate/1911” (SOLVED)

Scalable Vector Graphics (SVG) is an XML-based vector image format for defining two-dimensional graphics, having support for interactivity and animation. The SVG specification is an open standard developed by the World Wide Web Consortium (W3C) since 1999.

SVG images are defined in a vector graphics format and stored in XML text files. SVG images can thus be scaled in size without loss of quality, and SVG files can be searched, indexed, scripted, and compressed. The XML text files can be created and edited with text editors or vector graphics editors, and are rendered by the most-used web browsers.

On the Linux command line, images can be converted to SVG format using the utilities included in the ImageMagick (the package is called “imagemagick”). In addition to installing imagemagick, Arch Linux and derivative distributions must have the “librsvg” package installed to support the SVG format.

Converting to SVG format is done with a command like:

convert INPUT.jpg OUTPUT.svg

INPUT.jpg can be any image file instead.

You can also use the “magick” command:

magick INPUT.pdf OUTPUT.svg

When using the previous commands, you may encounter an error:

convert: delegate failed `'potrace' --svg --output '%o' '%i'' @ error/delegate.c/InvokeDelegate/1911.

Or an error:

magick: delegate failed `'potrace' --svg --output '%o' '%i'' @ error/delegate.c/InvokeDelegate/1911.

The error occurs because when converting images to SVG format, ImageMagick utilities rely on Potrace, which is not a default dependency for ImageMagick and is not installed with this package on Debian (and all derivative distributions) or Arch Linux (and derivative distributions).

To fix this error, just install the “potrace” package, this can be done with one of the following commands.

  • On Debian and derivative distributions (Ubuntu, Linux Mint, Kali Linux and others):
sudo apt install potrace
  • On Arch Linux and derivative distributions (Manjaro, BlackArch and others):
sudo pacman -S potrace
  • On macOS:
brew install potrace

As you can see, after installing potrace, the conversion from JPG to SVG format was successful:

How to show all errors in PHP 8

How to display all errors in PHP 8

By default, PHP 8 disables showing errors, so if there is a problem while executing a PHP script, nothing will be displayed on the screen. If an error in the program occurred before the output of the HTML code, then you will see a white screen of the web browser.

Where is the error output configured in PHP

Error output is configured in:

  • script code
  • .htaccess file
  • in the PHP configuration file (for example, in php.ini)

The settings in the script code only affect the behavior of the program in which the settings are made.

The settings in the .htaccess file affect all scripts in that directory and subdirectories.

The settings in the php.ini configuration file affect all PHP scripts that are run unless their error output settings are overridden.

Remember that error reporting is very useful while writing and debugging code, but on production servers, error reporting should be turned off to prevent sensitive data from being leaked and making it harder for an attacker to hack the site.

Configuring error output in PHP script

To display all errors, add the following lines to the beginning of the script:

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);

These settings enable the output of all errors and warnings to the user's web browser.

Warnings about the use of deprecated constructs will be displayed.

Error output to the web server logs is configured separately.

Remember that if fatal errors occur, that is, when the script could not even run due to incorrect PHP syntax, then the rules specified in the php.ini or .htaccess file will be used to output errors. This is due to the fact that if the syntax is incorrect, the PHP interpreter does not understand the entire file, including the above directives. That is, if a semicolon or a curly brace is missing in the code, then errors will be displayed in accordance with the settings in the php.ini file.

Configuring PHP error output in .htaccess file

Enabling error output in the .htaccess file is done by the following directives:

php_flag display_startup_errors on
php_flag display_errors on

For them to work, the web server must have .htaccess files enabled.

Error output to the web server log is performed by the following directive:

php_value error_log logs/all_errors.log

Setting the output of all errors in the php.ini file

The php.ini file is the PHP configuration file.

PHP can use more than one configuration file during its operation.

Location of php.ini file:

  • In Debian and derivative distributions (Ubuntu, Linux Mint, Kali Linux and others), it depends on the PHP version, for example, for PHP 8.1 the path to the file is: /etc/php/8.1/apache2/php.ini
  • On Arch Linux and derivative distributions (Manjaro, BlackArch and others): /etc/php/php.ini

In the php.ini file you will find the following directives:

display_errors = Off
display_startup_errors = Off

To enable error reporting, replace them with:

display_errors = On
display_startup_errors = On

The default value of error_reporting is set to:

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

This means that all errors are printed except for deprecation warnings and warnings caused by strict code checking.

To display all errors and warnings, set the following value:

error_reporting = E_ALL

Common Values:

  • E_ALL (Show all errors, warnings and notices including coding standards.)
  • E_ALL & ~E_NOTICE (Show all errors, except for notices)
  • E_ALL & ~E_NOTICE & ~E_STRICT (Show all errors, except for notices and coding standards warnings.)

See the link for details: https://www.php.net/manual/errorfunc.constants.php

In order for the changes made in the php.ini file to take effect, a restart of the web server is required.

  • In Debian and derivative distributions (Ubuntu, Linux Mint, Kali Linux and others), this is done with the command:
sudo systemctl restart apache2.service
  • In Arch Linux and derivative distributions (Manjaro, BlackArch and others), this is done with the command:
sudo systemctl restart httpd.service

To check that the php.ini file settings are actually applied, create a file, for example, named info.php and copy into it:


If you created the file in the root folder of the web server, in a web browser open http://localhost/info.php.

The following screenshot shows that error output is disabled in the php.ini file:

This screenshot shows that error output is enabled in the php.ini file:

Outputting errors to the web server log

Error output to the web server log is configured in the php.ini file.

The following directive is used for this:

log_errors = On

The location of the error file is configured in the web server configuration.

The “error_reporting('all');» и ошибка «Uncaught TypeError: error_reporting()”

When trying to use the following construct:


You will encounter the Uncaught TypeError: error_reporting() error.

Full error log:

[Wed Jul 06 07:29:19.410966 2022] [php:error] [pid 14101] [client] PHP Fatal error: Uncaught TypeError: error_reporting(): Argument #1 ($error_level) must be of type ?int, string given in /srv/http/suip/index.php:3\nStack trace:\n#0 /srv/http/suip/index.php(3): error_reporting('all')\n#1 {main}\n thrown in /srv/http/suip/index.php on line 3, referer: http://localhost/suip/

Instead of 'all' you need to provide a constant expressing the level of the error message. Valid values are provided on this page: https://www.php.net/manual/errorfunc.constants.php

The following entry is correct for PHP 8 and means to show all errors, notes, and recommendations: