Call to undefined function yii\web\mb_strlen()

Hi

I just installed YII2 on wampserver.

php: 5.4.6

wampserver3


I made a folder inside www named shopem.

When I try to open localhost/shopem/web/

I face to this error:

Call to undefined function yii\web\mb_strlen()

in C:\wamp\www\shopem\vendor\yiisoft\yii2\web\ErrorHandler.php at line 404

         continue;


        }





        if (is_object($value)) {


            $args[$key] = '<span class="title">' . $this->htmlEncode(get_class($value)) . '</span>';


        } elseif (is_bool($value)) {


            $args[$key] = '<span class="keyword">' . ($value ? 'true' : 'false') . '</span>';


        } elseif (is_string($value)) {


            $fullValue = $this->htmlEncode($value);


            if (mb_strlen($value, 'UTF-8') > 32) {


                $displayValue = $this->htmlEncode(mb_substr($value, 0, 32, 'UTF-8')) . '...';


                $args[$key] = "<span class=\"string\" title=\"$fullValue\">'$displayValue'</span>";


            } else {


                $args[$key] = "<span class=\"string\">'$fullValue'</span>";


            }


        } elseif (is_array($value)) {


            $args[$key] = '[' . $this->argumentsToString($value) . ']';


        } elseif ($value === null) {


            $args[$key] = '<span class="keyword">null</span>';
  1. yii\base\ErrorHandler::handleFatalError()

All required extensions are enabled and working.

I redownloaded the yii and problem exists yet.

I have found the solution.

I write it if somebody needs it.

Click on the wampserver icon. move to php.

click on php.ini. It may say there is no php.ini file. create it.

go to the path:

C:\wamp\bin\php\php5.6.15 (your php installation folder)

open php.ini with notepad

find the extension_dir="ext"

change it to :

extension_dir = "C:\wamp\bin\php\php5.6.15\ext"

then copy the content of this file…

again

Click on the wampserver icon. move to php.

click on php.ini.

paste the content on this file

that’s it.