moodle 4.2 dev lack of sodium package

moodle 4.2 dev lack of sodium package

xiaoyu yuan གིས-
Number of replies: 25

https://download.moodle.org/windows/MoodleWindowsInstaller-latest.zip

The bug image


Can anyone help me on installation? I can't get the red check disappear. I checked php.ini, and removed comment symbols on extension=sodium. But that doesn't work. What should I do?

དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Howard Miller གིས-
Core developers གི་པར Documentation writers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར
Is there a particular reason why you are (trying to) use the dev version of Moodle? 4.2 isn't released yet. It's quite likely that you are going to run into problems.

Having said that, this sounds like a possible bug in that installer package.
In reply to Howard Miller

Re: moodle 4.2 dev lack of sodium package

xiaoyu yuan གིས-
I'm testing how to upgrade to new version though. We just start using moodle and not so familiar with it. To avoid loss of data, we use dev version to test whether upgrade could be smooth
In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Visvanath Ratnaweera གིས-
Particularly helpful Moodlers གི་པར Translators གི་པར
To practice take a stable version of Moodle, the latest is 4.1.

Also note that an upgrade and an install are two different things. Ref. https://docs.moodle.org/401/en/Upgrading.

BTW, you practice on Windows. What is the OS of the production Moodle?

In reply to Visvanath Ratnaweera

Re: moodle 4.2 dev lack of sodium package

xiaoyu yuan གིས-
Hi thanks for your help, just solve that myself.

The moodle 4.2 requires php_sodium as compulsory, in 4.1 it is optional. but the complete install package doesn't have that yet, which is why I get that problem.

The solution to that is to download libsodium.dll from php website and put it in "Moodle-Server-Apache" folder

Just in case if this keep going on for the official version. Don't forget to download libsodium.dll yourself
In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Yaroslav Andrieiev གིས-
I'm a little stupid but I don't know where "Moodle-Server-Apache" is, I downloaded libsodium.dll but I just don't know where to put it (Linux arch)

I tried to put it in the php modules folder and specify

extension=libsodium.dll
extension=php_libsodium.dll

in php.ini


In reply to Yaroslav Andrieiev

Re: moodle 4.2 dev lack of sodium package

Ken Task གིས-
Particularly helpful Moodlers གི་པར
@Yaroslav Andrieiev

If you are using Linux, you are reading the wrong thread/postings as this thread is about Windows.   In linux, no such thing as a .dll - rather .so's (sharable objects).

Undo whatever you did to php.ini file.

You use your operating system's package manager - yum, dnf, apt-get to acquire the phpVR-sodium extension to your Linux system.  Once having accomplished that, restart your apache/web services to make the addition known to apache/moodle.

Extensions to PHP on linux systems are normally found in /etc/php.d/ - there is a .ini file for sodium in there that enables the extension.

Look at /etc/php.ini for
Directory in which the loadable extensions (modules) reside.

Your package manager should manage the location by itself.

'SoS', Ken



In reply to Ken Task

Re: moodle 4.2 dev lack of sodium package

Yaroslav Andrieiev གིས-
Thanks, i just use command: pacman -S php-sodium
In reply to Yaroslav Andrieiev

Re: moodle 4.2 dev lack of sodium package

Ken Task གིས-
Particularly helpful Moodlers གི་པར
@Yaroslav Andrieiev
Welcome!
Ahhhh ... sooo ... an Arch Linux system. We don't see many of those 'round here! དགའ་འཛུམ་
'SoS', Ken

In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Rick Jerz གིས-
Particularly helpful Moodlers གི་པར Testers གི་པར
Have you restarted Apache and mySQL? How do you know that you edited the correct version of php.ini?

I haven't used that installer in a while because I always had problems getting it to work. Instead, I install XAMPP and Moodle manually. I made this video a while ago showing how I do this. In my Windows 11 ("Insider" and virtual) PC, I have XMAPP and moodle running. My XAMPP Control Panel shows v3.3.0. My Moodle version is Moodle 4.0.4+ (Build: 20220922). I don't use this install that often, however. I use MAMP on my Mac.

In reply to Rick Jerz

Re: moodle 4.2 dev lack of sodium package

xiaoyu yuan གིས-
I tried Moodle 4.1 with complete installer package. The only I installed myself is MariaDB. Other modules can just running fine. This is the first time I can not go through the installing process. I attempted to modify code in php.ini, but no lucky
In reply to Rick Jerz

Re: moodle 4.2 dev lack of sodium package

xiaoyu yuan གིས-

and btw, in moodle 4.1, the sodium package is recommend and not necessary. When I was installing it, it showing that I didn't install it also. But with yellow check, not red check.

I modified the php.ini once again. and no lucky.

Is there any problem in php.ini method? No matter how I modify php.ini to enable sodium extension. I just cannot. I tried to get rid of semicolon in "extension=sodium" to get it activated.

In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Anil Karwankar གིས-
Copy libsodium.dll in c:\windows\system32
In reply to Anil Karwankar

Re: moodle 4.2 dev lack of sodium package

Rick Jerz གིས-
Particularly helpful Moodlers གི་པར Testers གི་པར
Anil, you jogged my memory (and notes). Here is what I have:

• For Sodium
Copy php/libsodium.dll to apache/bin/

Here are all my notes.  Maybe something from my notes will help.  I was doing a manual install of XAMPP and Moodle, not using the Moodle installer.

XAMPP on Windows11 (Parallels, 9/26/22)

Did an install of XAMPP 7.4.29
Got the following environment errors: intl, xmlrpc, soap, sodium, opcache, max_input_var.

Edit php.ini via the control panel, config

Removed “;” from extensions intl, xmlrpc, soap, sodium.

Made my normal edits to php variables, including max_input_var.

For Opcache
Add this line at the end of the php.ini file:
zend_extension = C:\xampp\php\ext\php_opcache.dll

In the same php.ini file, remove the ‘;’ from the following settings:

opcache.enable=1

opcache.memory_consumption=64 

opcache.max_wasted_percentage=5
opcache.use_cwd=1

Restarted services.  The following were still in error: sodium, opcache

For Sodium

Copy php/libsodium.dll to apache/bin/

Restarted services.

To fix the error when quitting xampp control panel app, change properties on xampp-control.ini to Security, “allow everyone full control.”


In reply to Rick Jerz

Re: moodle 4.2 dev lack of sodium package

James Calder གིས-
Plugin developers གི་པར

"For Sodium  Copy php/libsodium.dll to apache/bin/"

This fixed the issue for me, thanks.

In reply to James Calder

Re: moodle 4.2 dev lack of sodium package

Rick Jerz གིས-
Particularly helpful Moodlers གི་པར Testers གི་པར

Great to hear this, James.  I can't recall where I discovered this suggestion, but it is good that it works.  Thanks for letting us know.

In reply to James Calder

Re: moodle 4.2 dev lack of sodium package

Madhu W གིས-
Yes, this works for me.
Download libsodium.dll and put it inside the server--> Apache--> bin folder. And restart  the everything.
 Thank you.

In reply to Rick Jerz

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Eloy Lafuente (stronk7) གིས-
Core developers གི་པར Documentation writers གི་པར Moodle HQ གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར Testers གི་པར

Hi,

for the records, this is being managed @ MDLSITE-7506 .

Right now all the Moodle 4.1.x and up packages have been regenerated with a fix applied.

Also, an issue has been created @ XAMPP to see if the fix is valid and they can apply it for their next releases.

Hope it helps, ciao དགའ་འཛུམ་

PS: If with those new packages you still face problems, don't hesitate to comment in the Tracker issue above, TIA!

In reply to xiaoyu yuan

Re: moodle 4.2 dev lack of sodium package

Robert Estrella གིས-

Hello All, I have same problem as a new user of Moodle with this requirements needed

Attachment Screenshot 2024-05-08 130818.png
Attachment Screenshot 2024-05-08 130900.png
In reply to Robert Estrella

Re: moodle 4.2 dev lack of sodium package

Robert Estrella གིས-
Guys I already solved the issue related to sodium but the mariadb still waiting for your help
In reply to Robert Estrella

Ri: Re: moodle 4.2 dev lack of sodium package

Sergio Rabellino གིས-
Particularly helpful Moodlers གི་པར Plugin developers གི་པར

IMHO, the community couldn't help you more than saying: "You should upgrade your MariaDB installation". How to do this, depends on your operating system, it's not a matter of Moodle.

In reply to Robert Estrella

Re: moodle 4.2 dev lack of sodium package

Abigiya Tadesse གིས-
Update MariaDB (MySQL) to the Latest Version

I found this helpful YouTube video that guides you through the process of updating MariaDB (MySQL) to the latest version:

Watch the Video:

I hope you find it useful!
In reply to xiaoyu yuan

moodle 5.0 dev lack of sodium package

Abigiya Tadesse གིས-

Fixing the Sodium Extension Error in XAMPP for PHP 8.2

This will save you a ton of time:

  1. Copy the necessary files:

    • Copy php_sodium.dll from C:\xampp\php\ext\ to C:\xampp\apache\bin\

    • Copy libsodium.dll from C:\xampp\php\ to C:\xampp\apache\bin\

  2. Edit your php.ini file:

    • Open C:\xampp\php\php.ini

    • Find the following lines and uncomment them (remove the ; at the beginning):

      extension=sodium
      extension=libsodium.dll
      extension=php_libsodium.dll

  3. Restart Apache:

      • Go to your XAMPP Control Panel and restart Apache.

    I hope this helps — good luck! 

Attachment Capture.PNG