I've recently tried to install package through Composer, but I have got an error the requested PHP extension mbstring is missing from your system.
I removed semicolon from php.ini
, but it still doesn't work. What should I do?
Composer - the requested PHP extension mbstring is missing from your system [closed]
Asked Answered
I set the PHPRC variable and uncommented zend_extension=php_opcache.dll
in php.ini
and all works well.
Can you explain better what you did please? –
Malcommalcontent
sudo apt-get install php-mbstring
# if your are using php 7.1
sudo apt-get install php7.1-mbstring
# if your are using php 7.2
sudo apt-get install php7.2-mbstring
# if your are using php 7.4
sudo apt-get install php7.4-mbstring
This worked but I had to install the specific php version:
sudo apt-get install php5.6-mbstring
. Do a search with apt-cache search mbstring
to see which versions are available for your system. –
Onfroi also
apt-get install php7.1-mbstring
works for me –
Sunda If running this returns an error of
Unable to locate package php-mbstring
, try running sudo apt-get update
first. –
Bega And of course,
apt-get install php7.2-mbstring
–
Titanism confirmed working (sudo apt-get install php7.2-mbstring) on ubuntu php 7.2.24 –
Zischke
- find your
php.ini
- make sure the directive
extension_dir=C:\path\to\server\php\ext
is set and adjust the path (set your PHP extension dir) - make sure the directive
extension=php_mbstring.dll
is set (uncommented)
If this doesn't work and the php_mbstring.dll file is missing, then the PHP installation of this stack is simply broken.
I reinstalled server, but nothing has changed. –
Groscr
That's odd. Maybe ask for support over at MAMP or simply switch the stack.. XAMPP, WPN-XM. –
Anvers
I finally solved it. I set PHPRC variable and uncommented zend_extension=php_opcache.dll in php.ini. –
Groscr
And also I installed C++ redistributable and directx. I don't know where was a problem, but it works perfect now. –
Groscr
In my case there was no line for the extension php_mbstring in php.ini file. So I installed it using sudo apt-get install php7.3-mbstring. My php version is 7.3 and it worked like charm. –
Homotaxis
For php 7.1
sudo apt-get install php7.1-mbstring
Cheers!
this do not work for me, which repo are you using? –
Malcommalcontent
On Ubuntu 18 it worked as above. –
Gonsalves
I set the PHPRC variable and uncommented zend_extension=php_opcache.dll
in php.ini
and all works well.
Can you explain better what you did please? –
Malcommalcontent
© 2022 - 2024 — McMap. All rights reserved.
mbstring
settings uncommented inphp.ini
? – Overheat