John Davidson

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

0 comments
Message:


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.



My Answer:
To install the php_fileinfo extension in Windows 10, you can follow these steps:

1. Open your PHP installation directory (e.g. C:\Program Files\PHP\v7.4) and locate the "ext" folder.

2. Inside the "ext" folder, look for a file named "php_fileinfo.dll". If you don't find it, you may need to download the extension from the PHP website or another trusted source.

3. Once you have the "php_fileinfo.dll" file, copy it to the "ext" folder in your PHP installation directory.

4. Open your php.ini file located in the PHP installation directory (e.g. C:\Program Files\PHP\v7.4\php.ini) with a text editor.

5. Add the following line to the php.ini file:
extension=php_fileinfo.dll

6. Save the php.ini file.

7. If you encounter permission issues when trying to save the php.ini file, you can try running your text editor as an administrator. Right-click on the text editor icon and select "Run as administrator" before opening the php.ini file.

8. Restart your web server (e.g. Apache) for the changes to take effect.

After following these steps, the php_fileinfo extension should be installed and enabled in your PHP configuration on Windows 10. You can then try running the composer install command again to see if the issue is resolved.

Rate this post

3 of 5 based on 7593 votes

Comments




© 2024 Hayatsk.info - Personal Blogs Platform. All Rights Reserved.
Create blog  |  Privacy Policy  |  Terms & Conditions  |  Contact Us