Using Composer, PHP 7.4.1, Laravel 8.x and MAMP 4.2.0.
- Download and install MAMP or somehing similair.
- Download and install Composer.
- Choose PHP 7.4.1 from MAMP as command-line PHP, can be found at
C:\MAMP\bin\php\php7.4.16
.
- Choose PHP 7.4.1 from MAMP as command-line PHP, can be found at
- Using the command line, head to the folder
C:\MAMP\htdocs
. - Run command
composer create-project --prefer-dist laravel/laravel example
.- If you get issue 1, edit and add
extension=php_fileinfo.dll
toC:\MAMP\bin\php7.4.1\php.ini
andC:\MAMP\conf\php7.4.1\php.ini
. - You might need to restart Apache after this change.
- This might take couple of minutes, be patient.
- If you get issue 1, edit and add
- Open MAMP and start the server.
- Using the command line, go to your new project folder. Run the command
php artisan serve
. - Your server is now up and running on the listed IP-address.
- Missing fileinfo extension in PHP.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework[v8.12.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.12 -> satisfiable by laravel/framework[v8.12.0, ..., 8.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\MAMP\bin\php\php7.4.1\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.