Skip to content

Instantly share code, notes, and snippets.

@brandonsimpson
Last active August 14, 2016 10:33
Show Gist options
  • Save brandonsimpson/cdcd6af9d7c0bc4a04ec to your computer and use it in GitHub Desktop.
Save brandonsimpson/cdcd6af9d7c0bc4a04ec to your computer and use it in GitHub Desktop.
Ubuntu 14.04 (Trusty) php5-fpm PhalconPHP install

Ubuntu 14.04 (Trusty) php5-fpm PhalconPHP install

Optional - add repo for php 5.6.8

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update

Install packages

sudo apt-get install php5-dev libpcre3-dev gcc make php5-intl php5-mysql git-core autoconf

Check PHP Version & extension dir

php -v

php-config --extension-dir

Make sure when installing cphalcon the extension is being built in the correct extension directory for your php version. If you upgrade php versions, the package must be recompiled and placed in the correct extension directory for php to find it.

Clone cphalcon, build and install

git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install

Create the extension ini file

echo 'extension=phalcon.so' | sudo tee -a /etc/php5/mods-available/phalcon.ini
cd /etc/php5/mods-available    
sudo php5enmod phalcon

Restart nginx and php5-fpm

sudo service nginx restart
sudo service php5-fpm restart

Check php loaded the phalcon extension

php -m | grep phalcon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment