Setup PHPixie with MAMP
This is a somewhat non-standard installation of the framework. By default it installs the framework in a separate folder, but I like to keep all my files for a project together in one folder. If you prefer the standard installation, go to http://phpixie.com/tutorials/download-instructions/.
Installation
Create a new folder and navigate to it in Terminal.
In the new folder, install composer (if not already installed).
curl -sS https://getcomposer.org/installer | php
You should now see the file composer.phar in your folder.
Next, install the framework. (Just make sure to replace projectfolder with the name of your new folder).
php composer.phar create-project phpixie/projectfolder tutorial 2.*-dev --prefer-dist
Now you should see several new files and the folders assets, classes, vendors, and web.
Move Files
Move these files from web to your project folder.
.htaccess
index.php
robots.txt
Make some quick edits
In .htaccess -
// change the line
Rewrite Base /
// to
Rewrite Base /projectfolder/
In index.php -
// change the line
$root = dirname(__DIR__);
// to
$root = dirname(__DIR__) . '/projectfolder';
Next, open /classes/App/Pixie.php -
// add to
class Pixie extends PHPixiePixie {
// this line
public $basepath='/projectfolder/';
All Set
Now open your browser to your default MAMP path. Mine is http://localhost:8888/ and you should see a list of folders in htdocs, including your new project folder. Open it and you should see the Have fun coding message from PHPixie. Now your framework is contained in your project folder instead of the default setup.
That's how you setup PHPixie with MAMP. Now, get coding.