Home > other >  How can I install extension php_fileinfo in my php.ini in Windows 10
How can I install extension php_fileinfo in my php.ini in Windows 10

Time:11-12

I have a problem in my computer Windows 10.

I have some errors when I'm trying to do composer install in differents projects, for example :

  Problem 1
- laravel/framework[v8.65.0, ..., 8.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
- league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
- Root composer.json requires laravel/framework ^8.65 -> satisfiable by laravel/framework[v8.65.0, ..., 8.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
- C:\Program Files\PHP\v7.4\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

So I looked for how can I fix it and 80% responses is about "uncomment extension=php_fileinfo.dll in your php.ini".

The problem is that I don't find this line so I can't uncomment it => How can I install it in my Windows 10 ?

[ExtensionList]
extension=php_mysqli.dll
extension=php_mbstring.dll
(...)
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll

I tried just to add the line extension=php_fileinfo.dll in my php.ini and save it but I don't have the authorisation and I can't open this file as administrator with right click => How can I do this ?

If you have any way, let me know please, thanks.

CodePudding user response:

I am using Windows for Web Development, And have that kind of problem many times. Try to use Docker it will help you a lot in development.

https://www.docker.com/

CodePudding user response:

I found how to edit my php.ini in my Windows, following this link :

  1. Press the Windows logo (bottom left)
  2. Type Notepad on the search field
  3. Click right on the Notepad and select Run as administrator
  4. From Notepad, click on File > Open and paste C:\Program Files\PHP\v7.4\php.ini
  5. Edit
  6. Save
  • Related