Applicable to:
- Plesk Obsidian for Linux
Symptoms
-
Certain PHP applications running on PHP
8.1.7
,8.0.20
or7.4.30
fail with:PHP Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /opt/plesk/php/7.4/lib/php/modules/sodium.so (/opt/plesk/php/7.4/lib/php/modules/sodium.so: cannot open shared object file: No such file or directory), /opt/plesk/php/7.4/lib/php/modules/sodium.so.so (/opt/plesk/php/7.4/lib/php/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Cause
Product issue:
-
#PPPM-13609 "The Sodium extension is now dynamic for PHP 7.4, 8.0, and 8.1 again."
Fixed in:- PHP Updates 17 June 2022 (Linux)
Resolution
Workaround
-
Connect to the server via SSH
-
Remove/Move the leftover file:
for PHP 8.1# mv /opt/plesk/php/8.1/etc/php.d/sodium.ini /root/sodium.ini_81
for PHP 8.0# mv /opt/plesk/php/8.0/etc/php.d/sodium.ini /root/sodium.ini_80
for PHP 7.4# mv /opt/plesk/php/7.4/etc/php.d/sodium.ini /root/sodium.ini_74
Additional information
Sodium is now packed within the Plesk shipped PHP itself and is not a separate module anymore.
Comments
5 comments
On my server (Ubuntu 22.04 LTS and Plesk Obsidian Version 18.0.44 Update 2) there are none of the mentioned sodium.ini files and I get the mentioned error.
Hi,
# sudo apt-get install plesk-php74-sodium
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package plesk-php74-sodium is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
plesk-php74
E: Package 'plesk-php74-sodium' has no installation candidate
#-----
/opt/plesk/php/7.4/bin/php -m |grep -2 sodium
PHP Warning: PHP Startup: Unable to load dynamic library 'sodium' (tried: /opt/plesk/php/7.4/lib/php/modules/sodium (/opt/plesk/php/7.4/lib/php/modules/sodium: cannot open shared object file: No such file or directory), /opt/plesk/php/7.4/lib/php/modules/sodium.so (/opt/plesk/php/7.4/lib/php/modules/sodium.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
soap
sockets
sodium
SPL
sqlite3
Rene Siemon the package was removed as it is not needed anymore, it is now shipped with our builds
Please remove the leftover ini files as described in the article, should that not help, open a ticket with us to check it further
Hi Martin,
the problem was fixed with the last plesk update.
Please sign in to leave a comment.