
phpMyAdmin error “Error: Undefined constant “SODIUM_CRYPTO_SECRETBOX_KEYBYTES”” (SOLVED)
October 20, 2022
On Arch Linux, when trying to use the phpMyAdmin 5.3 pre-release, I encountered an error:
Error: Undefined constant "SODIUM_CRYPTO_SECRETBOX_KEYBYTES"
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
;extension=sodium
and uncomment it to get:
extension=sodium
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.
Related articles:
- How to reboot a server in DigitalOcean (71.5%)
- Error “No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php8.1-fpm.sock (*:80) failed” (SOLVED) (71.2%)
- PHP Warning: PHP Startup: imap: Unable to initialize module (SOLVED). How to install the imap module for PHP on Arch Linux (60.8%)
- How to install a web server (Apache, PHP, MySQL, phpMyAdmin) on Linux Mint, Ubuntu and Debian (60.7%)
- How to install Python as a CGI module in Apache on Linux (59.6%)
- How to reduce image size. Bulk photo scaling and resizing on the command line (RANDOM - 50%)