简体   繁体   中英

Ubuntu 16.04 The mbstring extension is missing

I want to migrate my web server from unsupported version of ubuntu 12.10. I installed 16.04 and installed apache2, php7, mysql and phpmyadmin.

When I want to use phpmyadmin I have error that mbstring missing.

In PHP.ini file, there is only to enable this extension for windows only.

When I install mbstring package, then when I reload phpmyadmin page, I get blank page without any error.

I installed following packages:

apache2, php, libapache2-mod-php, php-mysql, php-mbstring, php7.0-mbstring, mysql-server, phpmyadmin

When i uninstall mbstring packages, after phpmyadmin reload I see mbstring extension error...

What to do? I spent two days to fix this but have been unsuccessful... Thanks

安装php7.0-mbstring模块后,需要重启apache2才能生效: sudo apachectl graceful

I found the correct way (for me) to correct it... and it's fairly simple :)

Just add " universe " on the xenial-updates .

# cat /etc/apt/sources.list.d/*
deb [arch=amd64] http://fr.archive.ubuntu.com/ubuntu/ xenial-backports main
deb [arch=amd64] http://fr.archive.ubuntu.com/ubuntu/ xenial main universe
deb [arch=amd64] http://fr.archive.ubuntu.com/ubuntu/ xenial-proposed main
deb [arch=amd64] http://security.ubuntu.com/ubuntu xenial-security main
deb [arch=amd64] http://fr.archive.ubuntu.com/ubuntu/ xenial-updates main universe

to do that, just

sudo nano /etc/apt/sources.list.d/*

and then close all the windows, except the ones with xenial-updates where you add universe at the end of the line!

You could also just do this:

sudo add-apt-repository universe

On older versions of Ubuntu, you might have to add a full deb source line:

sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"

After adding the repositories, do sudo apt-get update to update the package list.

  1. check installed modules using; php -m in here you couldn't see mbstring module

  2. Then check the php version php -v

  3. Then install module using following command php5.6-mbstring

  4. Restart the apache server service apache2 restart

finally thats work fine.

I solve this problem from this post. 1-Install mbstring module according to your php version $ sudo apt-get install php7.2-mbstring 2-Install libapache2-mod module according your php version sudo apt-get install libapache2-mod-php7.2 3-Restart your apache2 services sudo service apache2 restart

Ressource Link

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM