In the examples shown, replace "X.Y" with your app's PHP version (for example, "7.0").

Phalcon is a PHP web framework implemented as a C extension offering high performance and lower resource consumption.

To use the Phalcon framework, you must first install the Phalcon PHP extension for your version of PHP.

Phalcon currently supports PHP 5.4, 5.5, 5.6, and 7.0.

Important: Your server must have at least 1GB of memory to build and install the Phalcon extension. Attempting to install Phalcon on low-memory systems may crash your server!

To install this extension, run the following on your server as root:

sudo apt-get 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

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.

When the above commands complete successfully, create a configuration file for the extension and restart PHP by running the following command as root:

sudo bash -c "echo extension=phalcon.so > /etc/phpX.Y-sp/conf.d/phalcon.ini"
sudo service phpX.Y-fpm-sp restart

You can verify Phalcon is installed by running

phpX.Y-sp -i

If Phalcon is installed correctly, you will see the following:

/etc/php7.0-sp/conf.d/phalcon.ini,
phalcon
phalcon => enabled
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.column_renaming => On => On
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.enable_literals => On => On
phalcon.orm.events => On => On
phalcon.orm.exception_on_failed_save => Off => Off
phalcon.orm.ignore_unknown_columns => Off => Off
phalcon.orm.late_state_binding => Off => Off
phalcon.orm.not_null_validations => On => On
phalcon.orm.virtual_foreign_keys => On => On

Installing Phalcon on PHP 7.1

The Phalcon extension does not currently work with PHP 7.1. If you attempt to install it on PHP 7.1, you will encounter errors building the extension. As soon as the extension is updated to work with PHP 7.1, you will be able to install it.

Alert: For Control Panel Help & Tutorials, click here: Panel Tutorials
Was this answer helpful? 0 Users Found This Useful (0 Votes)

Powered by WHMCompleteSolution