Answers.Body: <p>In order to install under MAMP with PHP7 we added the MAMP PHP7 path with the following command:</p>
  
  <blockquote>
    <p>export PATH="/Applications/MAMP/bin/php/php7.0.15/bin:$PATH"</p>
  </blockquote>
  
  <p>After achieving a successful Craft 3 install we ran the setup in the CLI and we also created a fresh DB and a new MAMP host following the sequence recommended in the installation docs. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-22T01:00:52.150Z
Answers.Text: Note that you need to swap out `php7.0.15` out for the exact version you are using. Just navigate to the directory in finder to double check.
Answers.UserDisplayName: Bonk
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-18T20:46:53.477Z
Answers.LastActivityDate: 2017-10-18T20:46:53.477Z
Answers.UserDisplayName: PhilR
Answers.Body: <p>According to this <a href="https://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path">thread</a> you can add</p>
  
  <pre><code># Use MAMP version of PHP
  PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
  export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH
  </code></pre>
  
  <p>to <code>.bash_profile</code>.</p>
  
  <p>This grabs your current php Version in MAMP and you can install it without setting <code>--ignore-platform-reqs</code>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-12T13:19:34.867Z
Answers.LastActivityDate: 2017-12-12T13:19:34.867Z
Answers.UserDisplayName: KSPR
Body: <p>When attempting to install Craft 3 in OSX El Cap, I'm getting the following errors:</p>
  
  <blockquote>
    <p>Script @php craft setup/welcome handling the post-create-project-cmd event returned with error code 255
    /Craft3/vendor/craftcms/cms/bootstrap/bootstrap.php on line 104</p>
    
    <p>Parse error: parse error in PATH/vendor/craftcms/cms/bootstrap/bootstrap.php on line 104
    Script @php craft setup/welcome handling the post-create-project-cmd event returned with error code 255</p>
  </blockquote>
  
  <p>I used the <code>--ignore-platform-reqs</code> flag as I am using PHP7 on MAMP.</p>
  
  <p>When I attempt to load index.php in the browser I'm seeing this seemingly related issue in the trace:</p>
  
  <blockquote>
    <p>in PATH/web/index.php at line 21 – yii\base\Application::run() 15161718192021    (new Dotenv\Dotenv(CRAFT_BASE_PATH))->load();}</p>
    
    <p>// Load and run Craft
    define('CRAFT_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
    $app = require CRAFT_VENDOR_PATH.'/craftcms/cms/bootstrap/web.php';
    $app->run();</p>
  </blockquote>
  
  <p>I've substituted "PATH" in all errors in lieu of the actual path.</p>
  
  <p>Any advice on resolving this would be much appreciated. </p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-18T17:41:15.783Z
Comments.Text: Sounds like your executing the default PHP 5.x PHP install instead of MAMP's PHP 7.  What if you run `/path/to/MAMP/PHP7/php /path/to/composer.phar create-project...`?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-18T18:36:33.853Z
Comments.Text: I was able to get a clean install and ran the setup in the CLI. I can now get to the CP login but nothing happens when I attempt to login. No error.
Comments.UserDisplayName: PhilR
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-18T19:04:54.583Z
Comments.Text: Started over at the top of the install and all is now working as expected. Thanks for your. help.
Comments.UserDisplayName: PhilR
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-18T19:29:05.217Z
Comments.Text: Glad you're all sorted... would you mind piecing together an official answer in case it ends up helping someone in the future?
Comments.UserDisplayName: Brad Bell
Tags: <craft3><installation>
Title: Error on Craft 3 install
ThreadText: # Error on Craft 3 install
  
  (Asked by: username_0 on 2017-10-18)
  
  When attempting to install Craft 3 in OSX El Cap, I'm getting the following errors:
  
  > Script @php craft setup/welcome handling the post-create-project-cmd event returned with error code 255
  > /Craft3/vendor/craftcms/cms/bootstrap/bootstrap.php on line 104
  >
  > Parse error: parse error in PATH/vendor/craftcms/cms/bootstrap/bootstrap.php on line 104
  > Script @php craft setup/welcome handling the post-create-project-cmd event returned with error code 255
  
  I used the `--ignore-platform-reqs` flag as I am using PHP7 on MAMP.
  
  When I attempt to load index.php in the browser I'm seeing this seemingly related issue in the trace:
  
  > in PATH/web/index.php at line 21 – yii\base\Application::run() 15161718192021 (new Dotenv\Dotenv(CRAFT\_BASE\_PATH))->load();}
  >
  > // Load and run Craft
  > define('CRAFT\_ENVIRONMENT', getenv('ENVIRONMENT') ?: 'production');
  > $app = require CRAFT\_VENDOR\_PATH.'/craftcms/cms/bootstrap/web.php';
  > $app->run();
  
  I've substituted "PATH" in all errors in lieu of the actual path.
  
  Any advice on resolving this would be much appreciated.
  
  **Tags:** craft3, installation
  
  > **Comments:**
  > **username_1**: Sounds like your executing the default PHP 5.x PHP install instead of MAMP's PHP 7.  What if you run `/path/to/MAMP/PHP7/php /path/to/composer.phar create-project...`?  
  > **username_0**: I was able to get a clean install and ran the setup in the CLI. I can now get to the CP login but nothing happens when I attempt to login. No error.  
  > **username_0**: Started over at the top of the install and all is now working as expected. Thanks for your. help.  
  > **username_1**: Glad you're all sorted... would you mind piecing together an official answer in case it ends up helping someone in the future?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-10-18. Score: 3 | Accepted answer
  
  In order to install under MAMP with PHP7 we added the MAMP PHP7 path with the following command:
  
  > export PATH="/Applications/MAMP/bin/php/php7.0.15/bin:$PATH"
  
  After achieving a successful Craft 3 install we ran the setup in the CLI and we also created a fresh DB and a new MAMP host following the sequence recommended in the installation docs.
  
  > **Comments:**
  > **username_2**: Note that you need to swap out `php7.0.15` out for the exact version you are using. Just navigate to the directory in finder to double check.  
  
  ---
  
  ### Answer by username_3 on 2017-12-12. Score: 2
  
  According to this [thread](https://stackoverflow.com/questions/4145667/how-to-override-the-path-of-php-to-use-the-mamp-path) you can add
  
  ```
  # Use MAMP version of PHP
  PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`
  export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH
  
  ```
  
  to `.bash_profile`.
  
  This grabs your current php Version in MAMP and you can install it without setting `--ignore-platform-reqs`.
  
  
  ---
  
  