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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is sodium missing from 7.2?

Discussion in 'EasyApache' started by Charlie Brown, Dec 7, 2017.

  1. Charlie Brown

    Charlie Brown Registered

    Joined:
    Dec 7, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    I set a site to PHP 7.2 using EA4 but the sodium functions are missing.
    - Removed -
    Is there an extra setting required or a module to turn on?
     
    #1 Charlie Brown, Dec 7, 2017
    Last edited by a moderator: Dec 7, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    First, you'd need to install libsodium and libsodium-devel (newer than version 1.0.8) on your OS. CentOS 7 provides 1.0.5 by default through YUM, so you'd need to manually install the newer RPMs, or compile the packages from source. Once you do that, browse to "WHM >> Software >> Module Installers", choose PHP Pecl, select "Apply" for PHP 7.2, and install the "libsodium" PECL module.

    Thank you.
     
  3. Charlie Brown

    Charlie Brown Registered

    Joined:
    Dec 7, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    For PHP Pre-7.2, it was true that you needed to do the PECL thing. But one of the new features(the best one) in 7.2 is built-in encryption. The php.net page even says "nothing required they are part of core" Unfortunately, there was "bug" (really an omission) and they forgot to put it in the first release. The bug has been fixed in dev and will be in the next incremental release. So I guess we wait. I was able to get it in there by compiling src but that's a big pain. In case anybody cares, the magic switch was --with-sodium
     
  4. Charlie Brown

    Charlie Brown Registered

    Joined:
    Dec 7, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    I see an update from the EasyApache4 group on 12-21-2017 but still no sodium in 7.2

    echo phpversion() . "<br>\n";
    if(function_exists('sodium_bin2hex')) {
    echo "sodium_bin2hex() exists!<br>\n";
    } else {
    echo "sodium_bin2hex() function does not exist<br>\n";
    }
    This prints:
    7.2.0
    sodium_bin2hex() function does not exist
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you verify which specific bug report you are referring to? Note that a new PHP 7.2 release has not yet been published by PHP, and thus was not included in the latest EasyApache 4 update.

    Thank you.
     
  6. Charlie Brown

    Charlie Brown Registered

    Joined:
    Dec 7, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    The bug I was referencing was on bugs.php.net: Bug #74826 "libsodium does not appear to be present" but it looks like it was fixed in July so I don't understand why the sodium functions weren't in the the latest EA4 rpm for PHP 7.2
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I've opened internal case EA-7063 to inquire about the status of libsodium as a core module in PHP 7.2. I'll update this thread with more information as it becomes available.

    Thank you.
     
  8. SpinIT

    SpinIT Member

    Joined:
    Jan 8, 2015
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Just wondering if there has been any update to this on your internal case? I ran into this issue as well, was excited to start using libsodium as it is now built into PHP 7.2, but was stumped when it didn't work with PHP 7.2 through cPanel :(

    Curious if this is likely to be fixed or if I have to use a workaround.

    Thanks!
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    41,502
    Likes Received:
    1,616
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It was determined to be an oversight, and it's inclusion is scheduled for a future EA4 release. However, there's currently no specific time frame to offer. I'll update this thread again as soon as new information is available.

    Thank you.
     
Loading...

Share This Page