phpmyadmin Error - mbstring

Discussion in 'ISPConfig 3 Priority Support' started by MaxT, Mar 28, 2019.

  1. MaxT

    MaxT Member HowtoForge Supporter

    "phpmyadmin Error - mbstring
    The mbstring extension is missing. Please check your PHP configuration."

    After the installation of additional php5.6, the phpmyadmin show this error. Before it was working.
    The system run the same php 7.0 than before. I have read many threads on this error but I cannot find a solution.
    I suppose I shouldn't recompile because before it was working.

    I have enabled the extension inside /etc/php/7.0/cli/php.ini and rebooted the machine, and the error persist

    # php -v
    PHP 7.0.33-0+deb9u1 (cli) (built: Dec  7 2018 11:36:49) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
        with Zend OPcache v7.0.33-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies

    #  php -a
    Interactive mode enabled
    php > echo extension_loaded('mbstring');

    # php -i | grep php.ini
    Configuration File (php.ini) Path => /etc/php/7.0/cli
    Loaded Configuration File => /etc/php/7.0/cli/php.ini
    # php -i | grep mbstring
    Zend Multibyte Support => provided by mbstring
    mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.
    mbstring.detect_order => UTF-8 => UTF-8
    mbstring.encoding_translation => On => On
    mbstring.func_overload => 0 => 0
    mbstring.http_input => auto => auto
    mbstring.http_output => UTF-8 => UTF-8
    mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
    mbstring.internal_encoding => UTF-8 => UTF-8
    mbstring.language => neutral => neutral
    mbstring.strict_detection => Off => Off
    mbstring.substitute_character => no value => no value    
    # cat /etc/php/7.0/cli/conf.d/20-mbstring.ini
    ; configuration for php mbstring module
    ; priority=20
    # locate
    # htop
    682 root       20   0  470M 45280 36460 S  0.0  0.3  0:00.13 +- php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
    917 www-data   20   0  469M 10880  2060 S  0.0  0.1  0:00.00 ¦  +- php-fpm: pool www                                                                                          916 www-data   20   0  469M 10880  2060 S  0.0  0.1  0:00.00 ¦  +- php-fpm: pool www
    915 web9       20   0  469M 11072  2252 S  0.0  0.1  0:00.00 ¦  +- php-fpm: pool web9
    some idea?
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You must install the mbstring PHP module for every PHP version you use on that machine. So maybe it is installed for PHP 7.0, but not for PHP 5.6 and the error you see comes from some application using PHP 5.6.
    MaxT likes this.
  3. MaxT

    MaxT Member HowtoForge Supporter

    lot of thanks, you are right :)
    I have write a phpinfo() inside index.php of /phpmyadmin. and it's using php5.6 !!

    Why some system applications are not using the same php version of the system (# php -i)?. When the phpmyadmin was installed, only php7.0 was present in the machine. That's normal?

    thanks! :)
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Probably you installed mod_php for php 5.6 (the libaapache2-.... package) and that removed the mod_php of PHP 7 as there can be only one mod_php module in apache. Websites in ISPConfig which allow you to switch php versions use php-fpm or php-fcgi, that's why the behave differently from phpmyadmin.
    MaxT likes this.
  5. MaxT

    MaxT Member HowtoForge Supporter

    oh .. ok. Thanks for the explanation. Just before I uninstalled the previous php5.6 installation because I needed mysql support for one site. Then I have disabled that php5.6-fpm service and install php5.6 with sury repos. Probably that's the cause?

    I hope php5.6 is not problematic for phpmyadmin....

    # locate libapache2
    # apache2ctl -M
    Loaded Modules:
     core_module (static)
     so_module (static)
     watchdog_module (static)
     http_module (static)
     log_config_module (static)
     logio_module (static)
     version_module (static)
     unixd_module (static)
     access_compat_module (shared)
     actions_module (shared)
     alias_module (shared)
     auth_basic_module (shared)
     auth_digest_module (shared)
     authn_core_module (shared)
     authn_file_module (shared)
     authz_core_module (shared)
     authz_host_module (shared)
     authz_user_module (shared)
     autoindex_module (shared)
     cgi_module (shared)
     dav_module (shared)
     dav_fs_module (shared)
     deflate_module (shared)
     dir_module (shared)
     env_module (shared)
     fcgid_module (shared)
     filter_module (shared)
     geoip_module (shared)
     headers_module (shared)
     include_module (shared)
     maxminddb_module (shared)
     mime_module (shared)
     mpm_prefork_module (shared)
     negotiation_module (shared)
     php7_module (shared)
     proxy_module (shared)
     proxy_fcgi_module (shared)
     python_module (shared)
     reqtimeout_module (shared)
     rewrite_module (shared)
     setenvif_module (shared)
     socache_shmcb_module (shared)
     ssl_module (shared)
     status_module (shared)
     suexec_module (shared)

    Thanks for the explanation.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    No, that should be fine.
    MaxT likes this.

Share This Page