How to: Install PHP Phalcon on cPanel servers using EasyApache

Phalcon a high performance mvc, robust and multi-functional PHP framework written as a C-extension. As any other extension, it’s compatible with Apache web server. On cPanel servers it can’t be installed in a native way, however there is an EasyApache 4 addon ready so you can install PHP Phalcon on cPanel servers without any issues.

Phalcon Features

  • Low-level architecture
  • C-extensions are loaded together with PHP when web server starts
  • All classes and classes by Phalcon are ready to use on any application.
  • Fast code is compiled for a specific platform and processor
  • Lowest overhead on the market for MVC based apps

How can I install PHP Phalcon on cPanel servers?

Guys at thecpaneladmin.com have made a fast solution to install PHP Phalcon on cPanel servers.
The first one is cloning the repository into the custom_opt_mods directory from EasyApache.

Clone this repo from into /var/cpanel/easy/apache/custom_opt_mods/ as you see below:

cd /var/cpanel/easy/apache/custom_opt_mods/
git clone https://github.com/thecpaneladmin/EA-PhalconPHP.git .
/scripts/easyapache

And the alternative way is to download the master.zip file:

cd /usr/src
wget https://github.com/thecpaneladmin/EA-PhalconPHP/archive/master.zip
unzip -d /var/cpanel/easy/apache/custom_opt_mods/ master.zip
/scripts/easyapache

After that, run EasyApache as always and select Phalcon from the list of PHP modules, after done the module should be loaded from /usr/local/lib/php.ini.

Warning: if you are running PHP as suPHP, CGI or FastCGI and you are using a local php.ini file, you are probably going to need to add your phalcon.so extension manually. This can be done adding this line into your local php.ini file:

extension=phalcon.so

And make sure phalcon.so is located at the directory of your extension_dir php.ini variable.

Conclusion

If you are looking to install PHP Phalcon on cPanel servers, then this tutorial should be more than enough to have your high performance php framework working as expected. Please let us know how it works for you.

Further reading:

About the Author: Esteban Borges

Experienced Sr. Linux SysAdmin and Web Technologist, passionate about building tools, automating processes, fixing server issues, troubleshooting, securing and optimizing high traffic websites.

Leave a Reply

Your email address will not be published. Required fields are marked *