Cannot Initialize mbstring with PHP 7

前端 未结 5 761
深忆病人
深忆病人 2020-12-05 22:41

Whenever I try to access phpMyAdmin, I receive the following error:

\"The mbstring extension is missing. Please check your PHP configuration.\"

相关标签:
5条回答
  • 2020-12-05 23:05

    run sudo apt-get update, sudo apt-get upgrade before installing with sudo apt-get install php-mbstring.

    I had the same problem today and found this way.

    0 讨论(0)
  • 2020-12-05 23:11

    I had this problem for a long time. I found the correct way (for me) to correct it... and it's fairly simple :)

    Juste 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**
    
    0 讨论(0)
  • 2020-12-05 23:22

    A solution was reached with the following method:

    I put extension=mbstring.so inside php.ini even though that is no longer the method PHP uses by default to load modules.

    From php.ini itself:

    Note: packaged extension modules are now loaded via the .ini files found in the directory /etc/php.d; these are loaded by default.

    It seemed to fix my problem. I would still be interested to hear if anyone else has a different take on this matter.

    0 讨论(0)
  • 2020-12-05 23:22

    For PHP7 on centos

    try this yum install php70-mbstring

    0 讨论(0)
  • 2020-12-05 23:31

    For those who have debian :

     sudo apt-get install php7.0-mbstring
    

    Otherwise in centos (tested in centos 6.6)

    sudo yum install php70w-mbstring
    

    and as @mpen said you can activate it

    sudo phpenmod mbstring
    
    0 讨论(0)
提交回复
热议问题