EasyApache4 Does Not Provision Sodium & PHP Does Not Load It
Im trying to add PHP's sodium (libsodium) extension with EasyApache. When I select it as an extension and try to provision, EA4 does not show any package changes in the summary screen and therefore does not provision anything. (Button is grayed out).
I thought this is because libsodium is included in PHP 7.4+ and I have 7.4 and 8, but when I check the loaded extensions of PHP sodium does not appear in the list. It shows PHP being compiled with '--with-sodium=shared' flag, but sodium does not show in the list of loaded extensions, therefore any sodium function errors out if used in a script.
In another server where EA4 works, I installed sodium and I see that EA4 drops a 20-sodium.ini file that loads the sodium extension into 20-sodium.ini /opt/cpanel/ea-php74/root/etc/php.d folder. In this server this ini file does not exist, and even if I manually create it, sodium still does not load.
Situation doesn't change even if i transfer entire EA4 configuration from the server where it works.
-
Hey there! Is it possible that the package is already installed in PHP? If you run this command, do you get any results? rpm -qa | grep -i sodium
0 -
Yes, installing the epel repo and sodium yum packages as I was told in the support ticket I opened fixed it. Apparently you still have to do that manually even if you are using PHP 7.4+. 0 -
Thanks for the additional details. Modern cPanel installations include the epel repository, so if that was removed or altered in some way that could lead to that situation. I'm glad we were able to help! 0 -
I had exactly the same problem and installing the epel repo and sodium yum packages did not immediatly fix it for me. Eventually I did a 'System Update' and then 'Update Server Software', after which I was able to add Sodium via EasyApache.
0
Please sign in to leave a comment.
Comments
4 comments