How to install Falcon at DirectAdmin?

aior

Administrator
Staff member
Joined
Apr 2, 2023
Messages
68
Reaction score
0
Points
6
Age
38
Location
Turkey
Website
aior.com
When I try to fix another problem at DirectAdmin and custom build update all, I lost Phalcon installation and got the problem as below:

Fatal error: Uncaught Error: Class "Phalcon\Mvc\Model" not found in /home/sikayetlerim/domains/sikayetlerim.com/public_html/public/index.php:5 Stack trace: #0 {main} thrown in /home/sikayetlerim/domains/sikayetlerim.com/public_html/public/index.php on line 5

1706821379744.png

The error message you're encountering indicates that PHP is unable to find the `Phalcon\Mvc\Model` class, which is part of the Phalcon framework, when trying to execute your script. This typically happens because the Phalcon extension is not installed or properly enabled in your PHP configuration. Here are steps you can take to resolve this issue:

To enable the Phalcon extension on AlmaLinux with DirectAdmin for PHP version 8.1, you can follow these general steps. This process involves using CustomBuild, a tool provided by DirectAdmin for managing software packages, including PHP and its extensions.

Step 1: Access Your Server

First, log in to your server via SSH as the root user. You can do this by using an SSH client and entering your server's IP address and the root password.

Step 2: Navigate to the CustomBuild Directory

Once logged in, navigate to the CustomBuild directory. This is typically located in `/usr/local/directadmin/custombuild`, but the path might vary depending on your DirectAdmin installation.

Code:
cd /usr/local/directadmin/custombuild

Step 3: Update CustomBuild Scripts

It's a good practice to update the CustomBuild scripts to ensure you have the latest versions of the software and extensions available.

Code:
./build update

Step 4: Configure Options for PHP

Before installing Phalcon, you might want to check or update your PHP configuration settings. Use the `options.conf` file to specify the PHP versions and modes.

Code:
nano options.conf

Look for the PHP version settings and ensure they are set to your desired versions. You can also configure other options as needed.

Step 5: Install Phalcon Extension

To install Phalcon for PHP 8.1, you will need to ensure that CustomBuild supports it directly, or you may need to manually compile the extension. As of my last update, direct support for Phalcon in CustomBuild might not be available for all PHP versions, especially newer ones.

If DirectBuild supports installing Phalcon directly, you could use a command like:

Code:
./build phalcon

You can use the code below instead

Code:
da build php_phalcon

if its already installed activate with:

Code:
da build set_php phalcon yes

Go do DirectAdmin Panel And Go to CustomBuild and See that you have a new message to install Falcon. Click install to install them. What like 10 minutes.


1706822486231.png
 
Last edited:
Top