If you haven’t heard about Phalcon yet, it’s amazing. I chose Phalcon because I recently started a project that had to be spun up quickly with little learning curve and low overhead.
If you view Phalcon’s Installation Instructions, there’s not much to follow if you’re a Mac user. At least not if you’re like me and have a MAMP installation running and didn’t feel like configuring apache and all that fun stuff natively (that’s what staging and production are for, am I right?) Surprisingly enough, getting Phalcon to install was pretty simple and straightforward. Here’s the process:
- Make sure you install MAMP and verify it works.
- Install XCode and that command line tools have been installed (Xcode > Preferences > Downloads)
- Check what PHP version you’re using in MAMP (for me it was 5.6.10)
- Download your source build from php.net (it’s extremely important you download the version of PHP you’re running on MAMP, not the latest(for me it was 5.6.10)).
The fun part. We’re going to assume that you’ve downloaded the source for PHP into ~/Downloads
# cd ~/Downloads # mkdir /Applications/MAMP/bin/php/php-5.6.10/include # tar zxvf php-5.6.10.tar.gz # mv php-5.6.10 /Applications/MAMP/bin/php/php-5.6.10/include/php # cd /Applications/MAMP/bin/php/php-5.6.10/include/php # sudo ./install
if you don’t want Terminal for that part use this method:
and extarct the file :
Rename the folder you got to
Copy the to
Now open terminal again ( we need to use it to install that version of php we added. )
This should leave you with a complete install of PHP 5.6.10 (where X is your version number)
Next we want to install Phalcon ( using Git will download the latest version from the Framework ):
# cd ~/Downloads # git clone --depth=1 git://github.com/phalcon/cphalcon.git # cd cphalcon/build # sudo ./install
Judging how finicky some Macs are you may have to install a few dependencies but if you’re successful, you should be greeted with a nice message along the lines of
Build complete. Don't forget to run 'make test'. Installing shared extensions: /Applications/MAMP/bin/php/php5.6.10/lib/php/extensions/no-debug-non-zts-20100525/ Thanks for compiling Phalcon!
Success! Now add the extension to your php.ini file
# echo "extension=phalcon.so" >> /Applications/MAMP/bin/php/php5.4.4/conf/php.ini
You can find instruction to add extention to you php.ini at https://github.com/majksner/php-phalcon-mamp
That’s it! Don’t forget to restart MAMP. For more information on how to get started with Phalcon, refer to the Phalcon Getting Started Guide
If need any help just write a comment and will be in touch with you.