require the following PHP extensions to be installed: phalcon code example

Example: phalcon extension

Installing the Phalcon Extension
-----------------------------------

1. To install this extension, run the following on your server as root:
	sudo apt-get -y install gcc make autoconf libc-dev pkg-config
	git clone --depth=1 git://github.com/phalcon/cphalcon.git
	cd cphalcon/build
	sudo PATH=/opt/sp/phpX.Y/bin:$PATH ./install

2. If the last command above fails and exits with the message gcc:
internal compiler error: Killed (program cc1), your server does not have 
enough memory to install Phalcon.

3. When the above commands complete successfully, create a configuration file 
for the extension and restart PHP by running the following commands as root:
	sudo bash -c "echo extension=phalcon.so > /etc/phpX.Y-sp/conf.d/phalcon.ini"	
    sudo service phpX.Y-fpm-sp restart

4. You can verify Phalcon is installed by running this command:
	phpX.Y-sp -i | grep phalcon
=====================================================================

 Uninstalling the Phalcon Extension
 ----------------------------------
 
1. To uninstall this extension, as root run the command:
	sudo rm /etc/phpX.Y-sp/conf.d/phalcon.ini

2. Next, restart PHP-FPM with the command:
	sudo service phpX.Y-fpm-sp restart

Tags:

Misc Example