Get Phalcon · v5
Phalcon v5 is a C extension. Install a package for your platform or compile it from source. You do not need to know C to use it.
Want pure PHP, with no extension? Phalcon v6 has the same API.
Install v6 with Composer →PIE (PHP Installer for Extensions) is the recommended way to install Phalcon. If you do not have PIE, install it first. Then run:
pie install phalcon/cphalcon Before you start
export CFLAGS="-Wno-incompatible-pointer-types"
sudo -E pie install phalcon/cphalcon PECL is deprecated, but it still works. Under Linux and macOS it compiles Phalcon on your machine. Make sure that you have pecl/pear installed.
pecl channel-update pecl.php.net
pecl install phalcon Use the repository of Ondřej Surý:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php-phalcon5 Remi Collet's repository has Phalcon packages for each PHP version. Enable it with the configuration wizard, then install the phalcon5 package for your PHP version.
Homebrew has binary packages, so you do not compile Phalcon yourself:
brew tap phalcon/extension https://github.com/phalcon/homebrew-tap
brew install phalcon MacPorts has one port for each PHP version. For example, for PHP 8.3:
sudo port install php83-phalcon Use the php-phalcon package from the AUR.
Use a binary package (one for each PHP version, for example PHP 8.3) or the ports tree:
pkg install php83-phalcon5
# or
cd /usr/ports/www/phalcon5 && make install clean cPanel and WHM support Phalcon through EasyApache 4. Enable the Phalcon module in EasyApache 4. See shared hosting in the docs.
You need the PHP development files for your PHP version, GCC (or Xcode on macOS), re2c and the libpcre development files. Each release ships the generated C sources, so you do not need Zephir.
git clone https://github.com/phalcon/cphalcon
cd cphalcon
git checkout tags/v5.22.1 ./
cd ext
./install
Then enable the extension: add extension=phalcon.so to the PHP configuration of the CLI and of the web
server, and restart the web server. Check it with php -m | grep phalcon. The docs have the
full steps.
Phalcon needs these PHP extensions when it loads: PDO, SPL, standard, hash, json. Some components use more, for example mbstring, openssl, or the PDO driver of your database.
Gentoo, Raspberry Pi and PHPBrew are in the installation guide.
Have a look at our support page. We will do our best to help you.