DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

Install PHP phalcon on DirectAdmin server

| 11:00:00 02.03.2020

A phalcon support has been added into CustomBuild script of DirectAdmin. 

Install PHP phalcon on DirectAdmin server 

Phalcon is a full-stack PHP framework delivered as a C-extension. Its innovative architecture makes Phalcon the fastest PHP framework ever built!

The current version offer they is 4.0.4. The extension can be installed only for PHP 7+. Older PHP versions are not supported.


In order to get the extension installed we run the following commands as root:

cd /usr/local/directadmin/custombuild/
./build update
./build set_php phalcon yes
./build php_phalcon

If you have old PHP versions from 5.x branch installed you will need to temporary disable them. Let's say we have 5.6 installed under php4_release:

PHP (default): 7.3 as php-fpm
PHP (additional): 7.2 as php-fpm
PHP (additional, 3rd): 7.1 as php-fpm
PHP (additional, 4th): 5.6 as php-fpm

In order to get everything done OK, we need first to disable PHP 5.6. Here is it installed under php4_release, in your particular case the things might differ, and you might need to adjust the command accordingly. So for our case we run:

./build set php4_release no

It is safe to disable PHP 5.6 for the installation time, the command will change only options, and it does not remove PHP 5.6 from a server.

And as soon as we complete with the installation of PHP phalcon we need to re-enable PHP 5.6 (and other old versions) with the following command:

./build set php4_release 5.6

Again: Here is PHP 5.6 installed under php4_release, and you might need to adjust the command accordingly if you have the things differed.

As soon as the installation completed fine we can run the following command and/or check output of phpinfo():

php -i | grep -i phalcon

in order to make sure the extensions is enabled.

A sample output is shown below:

# php -i | grep -i phalcon
Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.
phalcon => enabled
Author => Phalcon Team and contributors
phalcon.db.escape_identifiers => On => On
phalcon.db.force_casting => Off => Off
phalcon.orm.case_insensitive_column_map => Off => Off
phalcon.orm.cast_last_insert_id_to_int => Off => Off
phalcon.orm.cast_on_hydrate => Off => Off
phalcon.orm.column_renaming => On => On
phalcon.orm.disable_assign_setters => Off => Off
phalcon.orm.enable_implicit_joins => On => On
phalcon.orm.enable_literals => On => On => On => On
phalcon.orm.exception_on_failed_metadata_save => 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.update_snapshot_on_save => On => On
phalcon.orm.virtual_foreign_keys => On => On
phalcon.warning.enable => On => On

That's it.

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition