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.