32

I use 5.7v Laravel and 7.2.1v PHP and composer last version, but when I like to create new project these errors appeared:

Your requirements could not be resolved to an installable set of packages.

Problem 1
    - Installation request for league/flysystem 1.0.47 -> satisfiable by league/flysystem[1.0.47]. 
    - league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
Problem 2  
    - league/flysystem 1.0.47 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.  
    - laravel/framework v5.7.9 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.47]. 0 
    - Installation request for laravel/framework v5.7.9 -> satisfiable by laravel/framework[v5.7.9].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\php-7\php.ini You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.`
1
  • 4
    have you tried composer install to install the dependencies for the project?
    – nakov
    Commented Oct 10, 2018 at 7:21

7 Answers 7

109

First of all, stop the XAMPP/Wamp and then kindly remove the starting semicolon ( ; ) from your xampp\php\php.ini the following code.

;extension=fileinfo

or in windows with IIS

extension=php_fileinfo.dll

And then restart your XAMPP/Wamp.


NOTE: For Windows, you can find the file in the C:\xampp\php\php.ini-Folder (Windows) or in the etc-Folder (within the xampp-Folder).

3
  • 3
    In my case, i had both installed php and xampp and in my path, i pointed at c/php/as the PHP interpreter. In c:/php/php.ini, it was ;extension=fileinfo whereas in c:/xampp/php/php.ini it was extension=fileinfo. I did two changes, 1. Deleted c:/php/ 2. Changed my path to php to point to c:/xampp/php/ The problem is now resolved
    – blongho
    Commented Mar 4, 2020 at 20:28
  • I got this error on a cpanel. How can I fix it? Commented Jul 10, 2021 at 18:07
  • 1
    Worked for me! Thanks mr. Sarvaiya, this saved me a lot of time. Commented Nov 1, 2023 at 21:08
25

The problem seems to be what the error message says - your system is missing fileinfo PHP extension. Since you're on Windows, open C:\php-7\php.ini file, search for the following line, and remove the beginning ; if exists:

extension=fileinfo

or in windows with IIS

extension=php_fileinfo.dll
1
  • Windows is so weird when it comes to what is enabled by default.
    – apokryfos
    Commented Oct 10, 2018 at 8:16
5

Just uncomment extension=fileinfo in php.ini it worked for me even without xampp

3

In my case I just uncomment extension=fileinfo in php.ini then it works

2

In my case, I had both installed PHP and XAMPP and in my path, i pointed at C:/php/as the PHP interpreter. In C:/php/php.ini, it was ;extension=fileinfo whereas in C:/xampp/php/php.ini it was extension=fileinfo. I did two changes,

  1. Deleted C:/php/
  2. Changed my path to PHP to point to c:/xampp/php/

The problem is now resolved

0

Simple soultion, just delete php 7.4.11 folder from C drive.

update php location from C:\php 7.4.11 to C:\xampp\php in path variable under environmental variable

-4

in my case i am using window machine ...my league/flysystem is missing .. type this command in cmd on project Dir.. composer require league/flysystem

for mine case its work...