I get the above message after upgrading Moodle to 4.3. Running PHP Version 8.2.1, Ubuntu 22.04 LTS.
Exception - Call to undefined function mb_list_encodings()
More information about this error
Exception - Call to undefined function mb_list_encodings()
This suggests your PHP environment is missing the php-mbstring extension. The documentation on this a little out of date but may help.
PHP isn't finding the function mb_list_encodings()
.
You might need to restart the service php-fpm
to apply the change instead of apache2
.
If it's still not working use a PHP info file (a file containing <?php phpinfo();
) to report your PHP configuration.
Search for "mbstring" and check that it's listed and enabled:
And search for "disable_functions" to see if the function has been disabled (I can't imagine why it would be):
Remove the PHP info file when it's no longer needed, it could provide information about your server useful to an attacker.
The page you referred to shows how to compile for 2.x of Moodle and php 5.
Hmmmm ....
https://moodledev.io/general/releases/4.3
I see on above link that php extension sodium is now required.
apt-get ...
https://tecadmin.net/how-to-install-php-on-ubuntu-22-04/
I was able to sort out the PHP part. I get past the prerequisite part and go onto the plugin checklist and I have a ton of red like this below. Does the link you provided above give me places to install these?
Next, copy across your config.php, any custom plugins, and your .htaccess file if you created one (check that custom plugins are the correct version for your new Moodle first):
cp moodle.backup/config.php moodle cp -pr moodle.backup/theme/mytheme moodle/theme/mytheme cp -pr moodle.backup/mod/mymod moodle/mod/mymod
Enable debugging by adding these lines to config.php
, this should show more details with the error. As far as I can tell user/profile/field/file/field.class.php
has never been part of Moodle so I'm confused as to what could be trying to open this.