Home > OS >  Laravel php artisan serve not doing anything and project not being created properly (windows 10)
Laravel php artisan serve not doing anything and project not being created properly (windows 10)

Time:11-30

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?

CodePudding user response:

You can solve the problem by editing your php.ini file in your Windows, following these steps :

  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", then "Open" and paste the path of your php.ini file in the address bar (my case was C:\Program Files\PHP\v7.4\php.ini)
  5. When your file is open in your Notepad as administrator, remove the ; before the line extension=php_fileinfo.dll. If you can't find this line, then simply add it after the others php extension.
  6. Save
  7. Restart your computer
  8. Try again
  • Related