I am trying to use Laravel for the first time. I am trying to install it precisely as the guide says with composer but when I create a new project I get the following error:
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].
The project does get created, but when I type php artisan serve nothing happens. How can I fix this?
Advertisement
Answer
You can solve the problem by editing your php.ini
file in your Windows, following these steps :
- Press the Windows logo (bottom left)
- Type Notepad on the search field
- Click right on the Notepad and select “Run as administrator”
- From Notepad, click on “File”, then “Open” and paste the path of your php.ini file in the address bar (my case was
C:Program FilesPHPv7.4php.ini
) - When your file is open in your Notepad as administrator, remove the
;
before the lineextension=php_fileinfo.dll
. If you can’t find this line, then simply add it after the others php extension. - Save
- Restart your computer
- Try again