Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu 20.04, PHP 7.4: mbstring installed but not enabled

I'm running Ubuntu 20.04, and using PHP 7.4.

During a phpBB installation, it was reported "In order for phpBB to function correctly, the PHP mbstring extension needs to be available." I was able to install it; sudo apt list | grep mbstring reports php7.4-mbstring/focal,now 7.4.20-1+ubuntu20.04.1+deb.sury.org+1 amd64 [residual-config].

However, phpinfo.php reports Multibyte decoding support using mbstring disabled in the exif section. phpinfo.php also reports Loaded Configuration File /etc/php/7.4/apache2/php.ini.

I edited this .ini file to uncomment ;extension=mbstring in the Dynamic Extensions section, and restarted apache. However, phpinfo.php still reports the extension is diabled. I even rebooted the server, to no avail. What am I missing?

like image 813
shortmort37 Avatar asked Nov 16 '25 13:11

shortmort37


2 Answers

Well, I guess the right package was not installed; this did the trick: sudo apt-get install php7.4-mbstring. This delivered mbstring.so to the 20200930 directory, and phpinfo.php reports it enable.

like image 159
shortmort37 Avatar answered Nov 18 '25 21:11

shortmort37


Install version specific package. For me i am using php 8.0.16 so i did this and it sorted me out sudo apt-get install php8.0-mbstring

like image 38
orups Avatar answered Nov 18 '25 19:11

orups



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!