Skip to main content

Is sodium missing from 7.2?

Comments

37 comments

  • cPanelMichael
    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.
    0
  • Charlie Brown
    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
    0
  • Charlie Brown
    I see an update from the EasyApache4 group on 12-21-2017 but still no sodium in 7.2 echo phpversion() . "
    \n"; if(function_exists('sodium_bin2hex')) { echo "sodium_bin2hex() exists!
    \n"; } else { echo "sodium_bin2hex() function does not exist
    \n"; } This prints: 7.2.0 sodium_bin2hex() function does not exist
    0
  • cPanelMichael
    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.

    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.
    0
  • Charlie Brown
    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
    0
  • cPanelMichael
    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.
    0
  • SpinIT
    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!
    0
  • cPanelMichael
    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.
    0
  • Charlie Brown
    Any movement on this? I see several releases since December but still no sodium.
    0
  • cPanelMichael
    Any movement on this? I see several releases since December but still no sodium.

    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.
    0
  • SvenH
    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?
    0
  • cPanelMichael
    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: 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.
    0
  • Timdfw
    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
    0
  • cPanelMichael
    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.
    0
  • Charlie Brown
    We really need a timeframe for this since PHP5.6 is end-of life in a few months and 7.2 has mcrypt removed. That leaves us with nothing.
    0
  • cPanelMichael
    We really need a timeframe for this since PHP5.6 is end-of life in a few months and 7.2 has mcrypt removed. That leaves us with nothing.

    Hello @Charlie Brown, I don't have a specific time frame to offer yet, but note a workaround does exist in the meantime: 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.
    I'll update this thread again as soon as I have more information on the status of the case. Thank you.
    0
  • yatesf
    FYI, this same bug applies to EA4 - PHP 7.3 as well. The option to compile with sodium is currently not available. I wouldn't want to see it fixed in EA4 - PHP 7.2, but forgotten in EA4 - PHP 7.3
    0
  • cPanelMichael
    Hello Everyone, The updated case number for the inclusion of libsodium as a core PHP extension is ZC-3936. It's not currently slated for inclusion in the near future, but I'll continue to monitor the case and provide updates here as soon as there's progress. In the meantime, the recommended workaround remains to install the extension as a PECL module. Thank you.
    0
  • smallbiz
    Any rumblings yet about when this will be available?
    0
  • cPanelMichael
    Hello @smallbiz, There's no update to report at this time. To increase visibility, I recommend submitting a corresponding feature request for the inclusion of libsodium as a core extension for PHP versions 7.2 and 7.2. Here's the format you can use when creating a feature request to ensure your feedback gets as much visibility as possible and translates into actionable work: As a {cPanel User, System Administrator, web-hosting provider, or any other user perspective}, I would like {the feature that is being requested} so that {benefit that the request adds to the product}.
    Feel free to respond here with a link to the feature request upon approval, and I'll share the link whenever I see a reference to this request to help encourage votes. Thank you.
    0
  • srapsware
    i have installed on 7.2 by: first install : yum install libsodium-devel Then add by: Home >> Software >> Module Installers >>PHP PECL and add libsodium and install Thanks
    0
  • hub2000
    Hello, it does not work :-( installed libsodium and libsodium-devel, then under Home >> Software >> Module Installers >>PHP PECL : Installing PHP PECL "libsodium" WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update Warning: popen() has been disabled for security reasons in OS/Guess.php on line 241 Warning: fgets() expects parameter 1 to be resource, null given in OS/Guess.php on line 242 Warning: pclose() expects parameter 1 to be resource, null given in OS/Guess.php on line 251 downloading libsodium-2.0.22.tgz ... Starting to download libsodium-2.0.22.tgz (28,531 bytes) .........done: 28,531 bytes 4 source files, building running: phpize Warning: popen() has been disabled for security reasons in PEAR/Builder.php on line 465 ERROR: failed to run `phpize' What can be the problem? hub
    0
  • yatesf
    Warning: popen() has been disabled for security reasons... ... ... running: phpize Warning: popen() has been disabled for security reasons in PEAR/Builder.php on line 465 ERROR: failed to run `phpize'

    Your popen() function has probably been disabled in your php.ini (ie. "disable_functions = exec, popen, ..." etc.) Here's a helpful reference link regarding disabled functions in PHP:
    0
  • hub2000
    Hi, thank you, that worked. I only re-enabled popen() from Multi PHP Manager >> System-PHP Configuration >> Function List, but it was still in php.ini "editor mode", so both settings are not "connected"
    0
  • michaelxavier
    Go To Terminal
    yum install libsodium-devel
    Select When Done Y Then Go To Whm>>Software>>Module Installers>> PHP PECL "Manage Tab" click Search Type in sodium click go>> Then Click Install Wait till Done Then Restart Server Then Run Code to Verify Sodium Is Installed. [CODE=php]
    0
  • coursevector
    There's no update to report at this time. To increase visibility, I recommend submitting a corresponding feature request for the inclusion of libsodium as a core extension for PHP versions 7.2 and 7.2.

    How was this not installed by default and why does it even require a feature request to get a default feature in PHP? You guys seem fine adding newer version of PHP without a feature request and we don't have to put in a feature request for updates to PHP. PHP 7.4 is coming out soon, and we still have no libsodium, that's ridiculous. It's almost been a year since you posted this, any update?
    0
  • coursevector
    @cPanelMichael Is there any update on this?
    0
  • amstel
    @cPanelMichael Any update?
    0
  • cPRex Jurassic Moderator
    Michael doesn't hang around the forums too much anymore, but I'm happy to help! Currently I don't have any updates to provide. I do see there is a case open with our developers to get that added to the product, but it hasn't happened yet. You're always welcome to request an update here and I can check things for you.
    0
  • zabidin5584
    Does this extension availble for php 7.4?
    0

Please sign in to leave a comment.