I'm working on a Laravel project which is hosted on a remote server. When I run the project I get following error:
vendor/laravel/framework/src/Illuminate/Support/Str.php line 160: Call to undefined function Illuminate\Support\mb_strimwidth()
So I contacted the server support and they told me the extension is enabled by default in php.ini:
extension=php_mbstring.dll
But I get the same error when I try to run the project so I have run some tests to find out what is happening.
$path = php_ini_loaded_file();
echo 'The loaded file path is :' . $path;
if (extension_loaded('mbstring')) {
echo '<h1 style="color:red; font-size:50px;">extension is loaded<h1>';
}else {
echo '<h1 style="color:red; font-size:50px;">extension is not loaded<h1>';
}
Output:
The loaded file path is :/usr/local/lib/php.ini
extension is not loaded
I have no access to SSH or any CLI interface so it is very hard to debug. I would like to know why this is happening. Help is appreciated.
Update
The support announced me that running phpinfo()
does not return any entry for mbstring
.
The php.ini
file is loaded correctly with correct path.