Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED [ALTPHP-665] Can't enable libsodium extension with PHP Selector

Discussion in 'CloudLinux' started by nullmem, Dec 16, 2018.

Tags:
  1. nullmem

    nullmem Member

    Joined:
    Jan 21, 2018
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    Well, now the PECL libsodium module for alt-php70 and alt-php71 do not work. If you check the libsodium box and save in users cPanel account using the PHP Selector, the module does not load and the box won't stay checked.
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Can you open a support ticket so we can take a closer look at your system? You can post the ticket number here and we'll update this thread with the outcome.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    1,088
    Likes Received:
    445
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    2 days ago I reopened my support ticket to Cloudlinux and reported the following:

    In WHM ClouudLinux LVE Manager: Selector - the package is marked as "libsodium" for PHP versions 7.0 and 7.1 and "sodium" for PHP version 7.2 and neither are available for PHP 7.3

    In the users cPanel Select PHP Version: extensions it is marked as "libsodium" for PHP versions 7.0 and 7.1 and "sodium" for PHP version 7.2 and neither are available for PHP 7.3

    Additionally, whilst the /opt/alt/php7*/etc/php.d.all/libsodium.ini files exist for PHP 7.0 and 7.1 with the content as
    Code:
    ; Enable libsodium extension module
    extension=sodium.so
    for 7.2 the content is the same, but the file is called sodium.ini and there is neither sodium.ini nor libsodium.ini for 7.3

    The only version that I can save the "sodium" extension to is for 7.2

    Both 7.0 and 7.1 revert to unchecked after saving and then revisiting the selector.

    Today I revisited the ticket and, since it was marked as "Awaiting your reply", I asked if there was anything else they needed?

    Kate Grechishkina replied (obviously without even bothering to read through the ticket)
    I give up trying to help anyone - I don't know if its down to cultural differences, or just that every developer is too arrogant to imagine that their code could be wrong, or too proud to accept help from an outsider, but the overall feeling I have from everyone lately has left me with a bad taste and wondering why I bothered !

    I hope @cPanelMichael and @nullmem have better luck, and an altogether more gratifying and fruitful experience than I had.

    Please feel free to redact, mutilate or simply just delete this post ! I am getting used to taking the time to search, research and write answers and post them in an effort to help another user - only to have the post summarily deleted which, of course, is not at all demoralizing.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #3 rpvw, Dec 18, 2018
    Last edited: Dec 18, 2018
    nullmem likes this.
  4. nullmem

    nullmem Member

    Joined:
    Jan 21, 2018
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    Ticket #10995917
     
    cPanelMichael likes this.
  5. nullmem

    nullmem Member

    Joined:
    Jan 21, 2018
    Messages:
    7
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Austin, TX
    cPanel Access Level:
    Root Administrator
    On all my servers, I also have exactly the same result of not being able to enable libsodium(PECL module) on 7.0 & 7.1. However, for some reason my sodium(native PHP module) on 7.3 does work. Maybe someone I will have better luck with my ticket.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks. I'm monitoring this ticket and will update this thread with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    To update, CloudLinux case number ALTPHP-665 is now open to address the issue where it's not possible to enable the libsodium extension via PHP Selector for PHP 7.x versions. I'll monitor this case and respond to this thread once it's solved.

    In the meantime, the temporary workaround is to copy libsodium.ini to sodium.ini for the affected PHP versions and then run the cagefsctl --update command. For example, with PHP 7.1:

    Code:
    cp -av /opt/alt/php71/etc/php.d.all/libsodium.ini /opt/alt/php71/etc/php.d.all/sodium.ini
    mv /opt/alt/php71/etc/php.d.all/libsodium.ini /opt/alt/php71/etc/php.d.all/libsodium.ini.backup
    cagefsctl --update
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    1,088
    Likes Received:
    445
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I think that one should also delete or rename the libsodium.ini file to something like libsodium.ini.bak and then force an update of CageFS Skeleton

    Just copying the sodium.ini file will leave the libsodium option available in both the LVE Manager and the users cPanel Select PHP Version, and it won't enable sodium if checked and will confuse end users..

    The new sodium option seems to work in all the PHP7.x versions and shows in a phpinfo()
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @rpvw,

    Thanks, I've updated the workaround instructions.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    To update, CloudLinux published the solution to this issue to their stable repo today:

    Alt-PHP updated

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    1,088
    Likes Received:
    445
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    This keeps getting better :(

    After the alt-php update today I find the following:

    alt-php 70:
    libsodioum.ini using libsodium.so > links to sodium.so
    and
    sodium.ini using sodium.so

    alt-php 71:
    libsodioum.ini using libsodium.so > links to sodium.so
    and
    sodium.ini using sodium.so

    alt-php 72:
    sodium.ini using sodium.so

    alt-php 73:
    sodium.ini using sodium.so

    Does anyone know which .ini and .so files should be used for PHP 7.0 and 7.1 now ? or are the 7.2 and 7.3 missing libraries now ?

    UPDATE (Amended above as well)

    It seems that for alt-php 7.0 and 7.1 the libsodium.so file is a symlink to the corresponding sodium.so file

    I would like to be able to get rid of the duplicated (lib)sodium entries for alt-php 7.0 and 7.1, but I should like to be sure that I delete the correct ones, and what exactly CloudLinux will use as the default in future updates, or I may be going round in circles (not an uncommon state I find myself in these days :confused: )
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #11 rpvw, Jan 10, 2019
    Last edited: Jan 10, 2019
  12. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,603
    Likes Received:
    2,187
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @rpvw,

    I setup a new CloudLinux 7 test server running cPanel & WHM version 76, enabled CageFS, enabled PHP Selector, and installed the libsodium PECL module for AltPHP versions 7.0, 7.1, and 7.2 using WHM >> Module Installers >> PHP Pecl.

    Here's a look at the default files setup in each /opt/alt/php$$/etc/php.d.all/ directory after performing this action:

    Code:
    # pwd
    /opt/alt/php70/etc/php.d.all
    # ls -al|grep sodium
    -rw-r--r--  1 root root        59 Dec 25 13:39 libsodium.ini
    # cat libsodium.ini
    ; Enable libsodium extension module
    extension=libsodium.so

    Code:
    # pwd
    /opt/alt/php71/etc/php.d.all
    # ls -al|grep sodium
    -rw-r--r--  1 root root        59 Dec 25 13:48 libsodium.ini
    # cat libsodium.ini
    ; Enable libsodium extension module
    extension=libsodium.so


    Code:
    # pwd
    /opt/alt/php72/etc/php.d.all
    # ls -al|grep sodium
    -rw-r--r--  1 root linksafe    53 Dec 24 06:45 sodium.ini
    # cat sodium.ini
    ; Enable sodium extension module
    extension=sodium.so
    Is this the information you are seeking? If not, can you let me know which specific installation steps to use?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    1,088
    Likes Received:
    445
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Thanks @cPanelMichael

    That looks like 70 and 71 are using the libsodium modules and 72 and probably 73 are using the sodium modules as far as the LVE Manager and selector are concerned (It doesn't actually matter as they all appear to link or symlink to sodium.so anyway.

    I'm going to try deleting the sodium.ini files I created for 70 and 71 and see what breaks in the next alt-php update :-D
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice