First, install the necessary kit, if any, do not install the
#Ubuntu
sudo apt-get install php5-dev php5-mysql gcc Libpcre3-dev
#Fedora
sudo yum install php-devel php-mysqlnd gcc Libtool
#RHEL
sudo yum install php-devel php-mysql gcc Libtool
#Suse
Yast2-i php5-pear php5-devel php5-mysql gcc
#OS X (Using Homebrew)
Brew Tap Homebrew/dupes
Brew Tap Homebrew/versions
Brew Tap homebrew/php
Brew Install php5x Php5x-phalcon # Where "x"-Minor number of PHP
Second, download
git clone--depth=1 git://github.com/phalcon/cphalcon.git
Third, installation
CD Cphalcon/build
sudo./install
If the following error occurs
Cannot find CONFIG.M4.
Make sure this you run '/usr/local/php/bin/phpize ' in the top level source directory of the module
Configure:error:Cannot find Php-config. Please use--with-php-config=path
Can modify the install file
The phpize and./configue–enable-phalcon were amended to
/usr/local/php/bin/phpize and./configue–enable-phalcon–with-php-config=/usr/local/php/bin/php-config ( Here follow your own PHP installation path to fill in)
Installation Successful
Build complete.
Don ' t forget to run ' make test '.
Installing Shared extensions:/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/
Thanks for compiling phalcon!
Build succeed:please Restart your Web server to complete the installation
Iv. Adding PHP extensions
Edit PHP.ini Add a row
Extension=phalcon.so
Restart PHP
Phpinfo () see below to find Phalcon extension has been added successfully.
There's a situation that might alert you to the following.
PHP warning:php startup:unable to load Dynamic Library '/usr/lib64/php/modules/phalcon.so '-/usr/lib64/php/modules/pha lcon.so:undefined symbol:php_json_decode_ex in Unknown on line 0
This is due to a conflict with the JSON extension load sequence.
Workaround:
Do not add extension=phalcon.so this line in the php.ini, you can create a new file under the PHP.D folder Phalcon.ini, add Phalcon.ini in extension= Phalcon.so this line, restart PHP, find the extension plus a
Phalcon Official Installation Documentation Http://phalconphp.com/zh/download
This article is from the "System website Operations" blog, please be sure to keep this source http://cgc888.blog.51cto.com/3989433/1697829
Installing the PHP Phalcon extension