LoginSignup
0
0

More than 1 year has passed since last update.

PHP: undefined function mb_substr()

Posted at

次のようなエラーがでた時の対策

PHP Fatal error:  Uncaught Error: Call to undefined function mb_substr()

このエラーは、/var/log/nginx/error.log に出ました。

mbstring がインストールされているかの確認

php -m | grep mbstring

Ubuntu でのインストール方法

sudo apt install php-mbstring

インストールされたことの確認

$ php -m | grep mbstring
mbstring

次のバージョンで確認しました。

$ php --version
PHP 8.0.8 (cli) (built: Mar  3 2022 14:51:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.8, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.8, Copyright (c), by Zend Technologies
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0