Theme editor

Installing and activation Phalcon 3.4.5 to Cloudlinux and Directadmin

  • Thread starter Thread starter Aior
  • Start date Start date
  • Featured

Aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
83
Reaction score
2
Points
8
Age
39
Location
Turkey
Website
aior.com
Below is a step-by-step guide for installing Phalcon 3.4.5 from source and activating it under CloudLinux + DirectAdmin on PHP 7.3. Because CloudLinux does not ship Phalcon 3.4.5 by default, we’ll compile our own .so and then enable it via CloudLinux PHP Selector. Finally, we’ll show how to enable the extension specifically for a user (e.g., sikayetler), which is sometimes necessary when different users need different modules.

1. Have PHP 7.3 installed via CloudLinux (e.g., alt-php73).​

2. Install the devel package for alt-php73 if not already installed:​


Code:
yum install alt-php73-devel

3. Have development tools (e.g., gcc, make) on the system. If not:​


Code:
yum groupinstall "Development Tools"


4. Download and Compile Phalcon 3.4.5


1. Go to a build directory:

Code:
cd /usr/local/src

5. Clone the Phalcon 3.4.5 repo (or download the tarball):​


Code:
git clone -b v3.4.5 --depth=1 https://github.com/phalcon/cphalcon.git

6. Enter the relevant subdirectory (often build/php7/64bits for Phalcon 3.x):​


Code:
cd cphalcon/build/php7/64bits

7. Use CloudLinux’s alt-php7.3 phpize:​


Code:
/opt/alt/php73/usr/bin/phpize

8. Configure pointing to the correct php-config:​


Code:
./configure --with-php-config=/opt/alt/php73/usr/bin/php-config

9. Compile:​


Code:
make

10. Copy the resulting .so to the alt-php73 modules directory:​


Code:
cp -rp modules/*.so /opt/alt/php73/usr/lib64/php/modules/phalcon.so

11. Create the INI File


CloudLinux recommends placing custom extension config files in:

Code:
/opt/alt/php73/etc/php.d.all/

So create (or edit) the phalcon.ini there:

Code:
nano /opt/alt/php73/etc/php.d.all/phalcon.ini
Inside, just put:

Code:
extension=phalcon.so

Save and exit.

12. Make Sure the Domain Uses alt-php73


If your domain (e.g., sikayetlerim.com, emlakservisi.com) is not truly on alt-php73, it won’t see the extension. In DirectAdmin:

1. Go to Domain Setup (or “PHP Selector” in the user’s control panel).

2. Select PHP 7.3 (alt-php73) for that domain.

3. If there’s a .htaccess with AddHandler … php82, remove it or change to php73.

13. The most important step --> Activate Phalcon for a Specific User 👏


If you don’t enable it globally, or you want to selectively enable it for certain users, use:

Code:
selectorctl -u USERNAME -v 7.3 -e phalcon
For example, for user sikayetler:

Code:
selectorctl -u sikayetler -v 7.3 -e phalcon
Then confirm with:

Code:
selectorctl -u sikayetler -v 7.3 -g | grep phalcon
You should see phalcon listed, meaning it’s enabled for that user.

14. Final Check: phpinfo()


Create a phpinfo.php in the user’s document root:

Code:
<?php
phpinfo();
?>

15. Load it in a browser:​



• Confirm:

1. PHP Version 7.3.x … alt-php73

2. Phalcon shows up under the extension list.


If you see Phalcon 3.4.5 in phpinfo(), you’re all set!
 
Last edited:

Featured content

Back
Top