I have installed phalcon extension.It was installed successfully but the phalcon command not working. following Error shown.
\"iMac:project Atomix$ phalcon -sh: phalco
Install Phalcon in Mac OS X from Scratch
Keep in mind that Phalcon is a PHP Framework that improves the power of PHP, it means that Phalcon needs an Apache Web Server running PHP and a couple things more. Also Phalcon provides a developer tools that help to create many things very faster.
Requirements:
I am using Mac OS X El Capitan Version 10.11 (15A284)
Step 1 Install XCode
Step 2 Install Command Line Developer Tools
console$ xcode-select --install
Step 3 Install Homebrew
console$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
console$ brew doctor
console$ brew update
Step 4 Install PHP 5X (where X is the minor number version that you need 4, 5 or 6)
console$ brew tap homebrew/dupes
console$ brew tap homebrew/versions
console$ brew tap homebrew/homebrew-php
console$ brew tap homebrew/dupes
console$ brew install php5X
console$ brew install homebrew/php/php5X-mcrypt
Step 5 Create your Sites folder in your user folder
console$ mkdir ~/Sites
console$ echo "<?php phpinfo();" > ~/Sites/index.php
Step 6 Create your Developer folder in your user folder
console$ mkdir ~/Developer
Step 7 Setup your Apache Web Server
console$ sudo atom /etc/apache2/httpd.conf
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.so
User _www
Group _www
User your_username
Group staff
DocumentRoot "/Library/WebServer/Documents"
<Directory "/Library/WebServer/Documents">
DocumentRoot "/Users/your_username/Sites"
<Directory "/Users/your_username/Sites">
AllowOverride none
AllowOverride All
console$ sudo apachectl start
console$ sudo apachectl restart
console$ sudo apachectl stop
Step 8 Setup your PHP ini
console$ sudo atom /usr/local/etc/php/5.X/php.ini
Step 9 Installing MySQL
console$ sudo /usr/local/mysql/support-files/mysql.server start
/usr/local/mysql/bin/mysqladmin -u root password 'yourpasswordhere'
Step 10 Install GIT and your Profile file
console$ brew install git
console$ sudo atom ~/.profile
export PATH=$PATH:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/opt/php56/bin:'~/Developer/bin
Step 11 Finally Install Phalcon Framework
console$ brew install php5X php5X-phalcon
console$ git clone --depth=1 git://github.com/phalcon/cphalcon.git
console$ cd cphalcon/build
console$ sudo ./install
console$ sudo atom /usr/local/etc/php/5.X/php.ini
extension=phalcon.so
Step 12 Install Phalcon Developer tools
console$ git clone https://github.com/phalcon/phalcon-devtools.git
ln -s ~/Developer/phalcon-devtools/phalcon.php /usr/local/sbin/phalcon
chmod ugo+x /usr/local/sbin/phalcon
ln -s ~/Developer/phalcon-devtools/phalcon.php /usr/local/bin/phalcon
chmod ugo+x ~/Developer/bin/phalcon
console$ phalcon commands
NOTE1: to activate your profile you need to run this command:
console$ . ~/.profile
NOTE2: restart your apache server:
console$ sudo apachectl restart
Well i know that is a lot maybe there is some mistakes but I try to cover everything from the scratch.
I hope that this post will be helpful.
This is what I did to install Phalcon Developer-Tools for Mac 10.9:
Step 1
Using terminal, clone the devtools into your preferable location, I used the default document root.
$cd /Library/WebServer/Documents/
$git clone https://github.com/phalcon/phalcon-devtools.git
Step 2
Edit or create ~/.bash_profile
if you don't have one.
export PTOOLSPATH=/Library/WebServer/Documents/phalcon-devtools
export PATH="$PTOOLSPATH:$PATH"
Step 3
$sudo ln -s /Library/WebServer/Documents/phalcon-devtools/phalcon.sh /Library/WebServer/Documents/phalcon-devtools/phalcon
$chmod +x /Library/WebServer/Documents/phalcon-devtools/phalcon
Please make sure you change all the path above (/Library/WebServer/Documents/
) using yours.
Now try phalcon command again in the terminal. I hope it works :).
Phalcon extension does not provide the phalcon command line utility. To get the phalcon command line utility you need to install Phalcon Developer Tools for Mac from this link below http://docs.phalconphp.com/en/latest/reference/mactools.html
Phalcon is a great framework however support is wanting I ended up using this https://github.com/JohanSaltutti/php-phalcon-macos
to install on mac
Did you restart the webserver post installation?
Alternatively, it's easily installed on mac using homebrew:
$brew search phalcon
$brew install php56-phalcon