Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer can't find ext-mbstring even though it is installed

When I attempt to install Laravel 5 I get a dependency error. I'm using Uniform Server on Windows 7. I have enabled php_mbstring.dll and I checked it's loading properly. (I think)

Here is the console output (Composer):

Composer dependency error when installing laravel 5

Here are the extensions in my php.ini Php.ini extensions

Here are the phpinfo() mbstring details: mbstring installed

I don't know where to go from here. Any idea?

like image 656
CoCoMonk Avatar asked Feb 04 '15 23:02

CoCoMonk


People also ask

How can I tell if Mbstring is enabled?

You can check it through phpinfo(). Search for the string "mbstring" in phpinfo page. If it is present means then mbstring is enabled or it is disabled.

What is extension Mbstring?

Mbstring stands for multi-byte string functions. Mbstring is commonly used PHP extension and is required for our PDF and Email Extension to function properly. If mbstring is not enabled on your server, you may experience problems like blank pages (instead of the PDF file you expected), or emails that don't send.


1 Answers

Pay attention that, both in Windows and Linux, PHP can run with multiples php.ini configuration files.

In general, when you find this kind of issue, you have to double check that the configuration file loaded is the same that you are editing or you need to find the right path and add the extension also to the right php.ini configuration file.

While running a script through a web server, you can find the configuration file using the function

phpinfo();

and checking the line "Loaded Configuration File" (or just look for php.ini) PHP Info Screenshot

For what concern the CLI you can run in CMD

php --ini

and check the first lines in order to find the Loaded Configuration File value.

like image 174
Simone Cabrino Avatar answered Oct 12 '22 23:10

Simone Cabrino