Reputation: 81
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?
Upvotes: 4
Views: 12105
Reputation: 1703
for me, I was checking for php8.3 while the virtual host was running on php8.2
Upvotes: 0
Reputation: 99
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
Upvotes: 3
Reputation: 135
As you found out - the package was installed in the past but was erased (but not purged, so configuration files were left intact), this is indicated by [residual-config]
.
Your setup will be more future proof by installing php-mbstring
instead of php7.4-mbstring
unless your use case requires this exact release. php-mbstring
is just a dependency package the depends on the current release, so on 20.04 it installs php7.4-mbstring
but when you'll upgrade to the next OS release it will be upgraded according to whichever php release will be shipped with it.
Upvotes: 0
Reputation: 81
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.
Upvotes: 7