Articles in this section

PHP scripts fails with the following error: Unable to load dynamic library sodium.so : cannot open shared object file: No such file or directory

kb: bug kb: fixed Plesk Obsidian for Linux

Applicable to:

  • Plesk Obsidian for Linux

Symptoms

  • Certain PHP applications running on PHP 8.1.7, 8.0.20 or 7.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:

Resolution

Please consider updating your server:

Workaround

  1. Connect to the server via SSH

  2. 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.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.