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!

Is sodium missing from 7.2?

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

  1. Charlie Brown

    Charlie Brown Member

    Joined:
    Dec 7, 2017
    Messages:
    5
    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:
    44,344
    Likes Received:
    1,852
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Charlie Brown

    Charlie Brown Member

    Joined:
    Dec 7, 2017
    Messages:
    5
    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 Member

    Joined:
    Dec 7, 2017
    Messages:
    5
    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:
    44,344
    Likes Received:
    1,852
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. Charlie Brown

    Charlie Brown Member

    Joined:
    Dec 7, 2017
    Messages:
    5
    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:
    44,344
    Likes Received:
    1,852
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    44,344
    Likes Received:
    1,852
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Charlie Brown

    Charlie Brown Member

    Joined:
    Dec 7, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    3
    Location:
    FL
    cPanel Access Level:
    Root Administrator
    Any movement on this? I see several releases since December but still no sodium.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There's no update to report at this time. I'll update this thread as soon as more information on the estimated release date is available.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. SvenH

    SvenH Registered

    Joined:
    Mar 14, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Norway
    cPanel Access Level:
    Root Administrator
    What is the status on this?

    It is currently three and a half months since PHP 7.2 was released so, I am quite surprised to find out that WHM/Cpanel does not provide a proper install of PHP 7.2

    Is there any workaround for WHM/Cpanel on how to install PHP 7.2 with sodium?
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    There's no specific time frame to offer on it's publication at this time, but I'll update this thread as soon as that information is available. Here's a quote from my earlier response regarding a workaround:

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Timdfw

    Timdfw Registered

    Joined:
    Jul 20, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    DFW
    cPanel Access Level:
    Root Administrator
    Hello, We just installed php v 7.2.7 and still no sodium; do you have any updates on when this will be fixed?

    Thanks
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,852
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @Timdfw,

    I don't have new information to report at this time. I'll continue to monitor the internal case and update this thread as soon as an update is available.

    Thank you.
     
    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