I have installed phalcon extension.It was installed successfully but the phalcon command not working. following Error shown.
"iMac:project Atomix$ phalcon -sh: phalcon: command not found"
I have Followed instruction from Phalcon official website.it works on windows and Linux perfectly but not in mac os.
Step 1: Download developer tools from https://github.com/phalcon/phalcon-devtools of correct version. Extract in C:\ drive which looks like C:\phalcon-devtools-master. Check by running WAMP server then click on phpinfo(). Step 2: Set environment variables for PHP and Phalcon developer tools.
To check if Phalcon has been successfully installed, you'll need to check the output of phpinfo() statement.
Installation Platforms. Since Phalcon is compiled as a PHP extension, its installation is somewhat different than any other traditional PHP framework. Phalcon needs to be installed and loaded as a module on your web server.
The format is as follows: ABBCCDE A - Major version B - Med version (two digits) C - Min version (two digits) D - Special release: 1 = Alpha, 2 = Beta, 3 = RC, 4 = Stable E - Special release version i.e. RC1, Beta2 etc.
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/dupesconsole$ brew tap homebrew/versionsconsole$ brew tap homebrew/homebrew-phpconsole$ brew tap homebrew/dupesconsole$ brew install php5Xconsole$ brew install homebrew/php/php5X-mcryptStep 5 Create your Sites folder in your user folder
console$ mkdir ~/Sitesconsole$ echo "<?php phpinfo();" > ~/Sites/index.phpStep 6 Create your Developer folder in your user folder
console$ mkdir ~/DeveloperStep 7 Setup your Apache Web Server
console$ sudo atom /etc/apache2/httpd.confLoadModule rewrite_module libexec/apache2/mod_rewrite.soLoadModule php5_module libexec/apache2/libphp5.soLoadModule php5_module /usr/local/opt/php56/libexec/apache2/libphp5.soUser _wwwGroup _wwwUser your_usernameGroup staffDocumentRoot "/Library/WebServer/Documents"<Directory "/Library/WebServer/Documents">DocumentRoot "/Users/your_username/Sites"<Directory "/Users/your_username/Sites">AllowOverride noneAllowOverride Allconsole$ sudo apachectl startconsole$ sudo apachectl restartconsole$ sudo apachectl stopStep 8 Setup your PHP ini
console$ sudo atom /usr/local/etc/php/5.X/php.iniStep 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 gitconsole$ sudo atom ~/.profileexport PATH=$PATH:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/opt/php56/bin:'~/Developer/binStep 11 Finally Install Phalcon Framework
console$ brew install php5X php5X-phalconconsole$ git clone --depth=1 git://github.com/phalcon/cphalcon.gitconsole$ cd cphalcon/buildconsole$ sudo ./installconsole$ sudo atom /usr/local/etc/php/5.X/php.iniextension=phalcon.soStep 12 Install Phalcon Developer tools
console$ git clone https://github.com/phalcon/phalcon-devtools.gitln -s ~/Developer/phalcon-devtools/phalcon.php /usr/local/sbin/phalconchmod ugo+x /usr/local/sbin/phalconln -s ~/Developer/phalcon-devtools/phalcon.php /usr/local/bin/phalconchmod ugo+x ~/Developer/bin/phalconconsole$ phalcon commandsNOTE1: 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With