RequirementsPHP 7.2Phalcon v4 supports only PHP 7.2 and above. PHP 7.1 has been released 2 years ago and its active support has lapsed, so we decided to follow actively supported PHP versions. Installing a web server is outside the scope of this document. Please refer to relevant guides on the Internet on how to install a web server. PSRPhalcon requires the PSR extension. The extension can be downloaded and compiled from this GitHub repository. Installation instructions are available on the
PDOSince Phalcon is loosely coupled, it exposes functionality without the need for additional extensions. However, certain components rely on additional extensions to work. When in need for database connectivity and access, you will need to install the
Load orderPhalcon needs to be loaded after
HardwarePhalcon is designed to use as little resources as possible, while offering high performance. Although we have tested Phalcon in various low end environments, (such as 0.25GB RAM, 0.5 CPU), the hardware that you will choose will depend on the your application needs. We have hosted our website and blog for the last few years on an Amazon VM with 512MB RAM and 1 vCPU. Software
Along with PHP 7.2 or greater, depending on your application needs and the Phalcon components you need, you might need to install the following extensions:
For the PeclThe Pecl installation method is available for Windows, Linux and MacOS. Under windows pre-compiled dll files will be used. Under Linux and MacOS it will compile Phalcon locally so it could be faster to use a different installation method on these platforms. To install using Pecl make sure you have pecl/pear installed.
Debian
and then try and install Phalcon again CentOS
Mac/Osx using BrewWithout
For Maverick if it gives you error, you can use
Installation PlatformsSince Phalcon is compiled as a PHP extension, its installation is somewhat different than any other traditional PHP framework. Phalcon needs to be installed and loaded as a module on your web server. LinuxTo install Phalcon on Linux, you will need to add our repository in your distribution and then install it. DEB Based Distributions (Debian, Ubuntu, Etc.)Repository installationAdd the repository to your distribution: Stable releases
Nightly releases
Mainline releases (alpha, beta etc.)
Phalcon installationTo install Phalcon you need to type the following commands in your terminal:
Additional PPAsOndřej Surý If you do not wish to use our repository at packagecloud.io, you can always use the one offered by Ondřej Surý. Installation of the repo:
and Phalcon:
RPM Based Distributions (CentOS, Fedora, Etc.)Repository installationAdd the repository to your distribution: Stable releases
Nightly releases
Mainline releases (alpha, beta etc.)
Phalcon installationTo install Phalcon you need to issue the following commands in your terminal:
Additional RPMsRemi Remi Collet maintains an excellent repository for RPM based installations. You can find instructions on how to enable it for your distribution here. Installing Phalcon after that is as easy as:
Additional versions are available both architecture specific (x86/x64) as well as PHP version specific FreeBSDBinary package (pkg) and compile myself from source (ports) are available for FreeBSD. To install it you will need to issue the following commands: pkg
ports
GentooAn overlay for installing Phalcon can be found here Raspberry Pi
It is also necessary to increase the swap file from the default 100 MB to at least 2000 MB. Because, the compiler lacks RAM.
Replacing After saving the setting, restart the daemon:
macOSBrew includes binary packages so you don’t need to compile Phalcon yourself. If you want to compile the extension yourself you need the following dependencies installed: Compilation requirements
BrewBinary installation (preferred):
Compile phalcon:
MacPorts
Edit your php.ini file and then append at the end: Restart your webserver. PHPBrew (macOS/Linux)PHPBrew is an excellent way to manage multiple versions of PHP and PHP extensions on your system(s). Installation instructions for PHPBrew can be found here If you’re using PHPBrew, you can install Phalcon using the following:
You can install the PSR dependency via phpbrew as well if needed:
WindowsTo use Phalcon on Windows, you will need to install the phalcon.dll. We have compiled several DLLs depending on the target platform. The DLLs can be found in our download page. Identify your PHP installation as well as architecture. If you download the wrong DLL, Phalcon will not work. The available DLLs are:
Edit your php.ini file and then append at the end:
Restart your webserver. Compile From SourcesCompiling from source is similar to most environments (Linux/macOS). Requirements
CompilationDownload the latest Clone the repository
Compile Phalcon
Check the module You will now need to add
The instructions above will compile and install the module on
your system. You can also compile the extension and then add it manually in your
If you use the above method you will need to add the Tuning BuildBy default we compile to be as compatible as possible with all processors (
This will generate the best possible code for that chipset but will likely break the compiled object on older chipsets. Shared HostingRunning your application on shared hosting might restrict you in installing Phalcon, especially if you do not have root access. Some web hosting control panels luckily have Phalcon support. cPanel & WHMcPanel & WHM support Phalcon using Easy Apache 4 (EA4). You can install Phalcon by enabling the module in Easy Apache 4 (EA4). PleskThe plesk control panel doesn’t have Phalcon support but you can find installation instructions on the Plesk website |