I. install Phalcon
First of all. I installed php development resources & GCC compiler:sudo apt-get install php5-dev php5-mysql gcc
Download & install phalcon:
git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./installFaced first error:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
#include "pcre.h"
^
compilation terminated.
make: *** [phalcon.lo] Error 1
After checking for a while, Phalcon need : libpcre3-dev pakage :
apt-get install libpcre3-devwee need add new config in additional .ini files/
Create phalcon.ini file in /etc/php5/apache2/conf.d/phalcon.ini add : extension=phalcon.so in this file.
Reload your server. It works !
II. Install Phalcon developer tool
After installing Phalcon and Phalcon developer tool successfully . We may got new message when try to use Phalcon developer tool byphalcon
command
$ phalcon ERROR: Phalcon extension isn't installed, follow these instructions to install it: http://docs.phalconphp.com/en/latest/reference/install.htmlIt means your php cli didn't realase phalcon framework (phalcon.so). Wee need to add phalcon.ini files in configuration file of PHP5 cli. First of all, find Configuration file Path by command
php -i | grep "Configuration File" #result: Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini #cd to Configuration Path $ cd /etc/php5/cli/ $ /etc/php5/cli$ ls #result conf.d php.iniYou can see that we have another php.ini file and conf.d folder in Configuration path. Add phalcon.ini which contain
extension=phalcon.so
into conf.d folder.
Try your phalcon command again . It works !