I am trying to install Craft 5, but the Composer-based installation is throwing several errors at the end. These errors appear after all packages seem to be successfully downloaded and installed by Composer. The install command I ran:
composer create-project craftcms/craft myprojectname
And the tail end of the output where the errors occur:
> @php -r "file_exists('.env') || copy('.env.example.dev', '.env');"
ERROR: Invalid syntax. Value expected for '-r'.
Type "WHERE /?" for usage.
> @php -r "unlink('composer.json');"
ERROR: Invalid syntax. Value expected for '-r'.
Type "WHERE /?" for usage.
> @php -r "rename('composer.json.default', 'composer.json');"
ERROR: Invalid syntax. Value expected for '-r'.
Type "WHERE /?" for usage.
> @php craft install
Generating an application ID ... done (CraftCMS--6176f2a9-603b-44d9-877c-7dd0c8da5b)
Generating a security key ... done (FTj7BEzuRcOIEf8XKEWxUmTwm8C64)
Invalid options:
--username: Username cannot be blank.
--email: Email cannot be blank.
--password: New Password should contain at least 6 characters.
--site-name: Name cannot be blank.
--language: Language cannot be blank.
Script @php craft install handling the post-create-project-cmd event returned with error code 64
I'm using PHP 8.3.7 on Windows 11 with MAMP 5.0.6.
"php -v" returns this:
PHP 8.3.7 (cli) (built: May 31 2024 15:03:52) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.3.7, Copyright (c) Zend Technologies
Given that I copied the install command right off the Craft "Getting Started" web page, and 8.3 is a supported php version, I'm not sure why I'm running into trouble right off the bat.