To install Phalcon 3.4.5 with PHP 7.3 on a server that uses DirectAdmin with CustomBuild 2.0, you should follow a series of steps that typically involve downloading the Phalcon source, preparing your environment, compiling the extension, and configuring PHP to use it. The process outlined below is adapted to fit the requirements for Phalcon 3.4.5 and PHP 7.3, based on general practices for installing PHP extensions manually:
Step 1: Prepare Your Environment
1. Access Your Server: Log in to your server via SSH as the root user.
2. Update CustomBuild**: Ensure CustomBuild is up to date.
Step 2: Download Phalcon 3.4.5
1. Clone the Phalcon Repository: Clone the specific version of Phalcon from its GitHub repository.
Step 3: Compile Phalcon
1. Prepare the Build Environment: Use `phpize` to prepare Phalcon for compilation. Make sure to specify the path for the PHP 7.3 `phpize` and `php-config`.
2. Configure the Compilation: Run the `./configure` script, pointing to your PHP 7.3 `php-config`.
3. Compile and Install: Compile the Phalcon extension and install it.
Step 4: Enable Phalcon in PHP 7.3
1. **Configure PHP**: Add the Phalcon extension to your PHP 7.3 configuration.
- Find the PHP 7.3 `php.ini` file. You can usually find this path by running `/usr/local/php73/bin/php --ini`.
- Add the following line to your `php.ini`:
For me it was like:
Be sure that you removed ; before extension=phalcon.so or type it directly without ;
Then Save with Ctrl + Y and Enter
Step 5: Restart the Web Server
- Restart Apache or PHP-FPM to apply the changes. The command depends on your server setup:
- For Apache:
- For PHP-FPM:
For LiteSpeed
Step 6: Verify Installation
- Confirm that Phalcon is installed correctly:
This process assumes a certain level of access and control over your DirectAdmin environment and might require adaptations based on your specific server setup, PHP configurations, and how PHP extensions are managed on your system. Always back up your configurations before making significant changes.
For the most accurate and detailed instructions, consult DirectAdmin's official documentation, the CustomBuild script documentation, or seek assistance from the DirectAdmin community forums, especially if you encounter issues specific to your server environment.
Step 1: Prepare Your Environment
1. Access Your Server: Log in to your server via SSH as the root user.
2. Update CustomBuild**: Ensure CustomBuild is up to date.
Code:
cd /usr/local/directadmin/custombuild
./build update
Step 2: Download Phalcon 3.4.5
1. Clone the Phalcon Repository: Clone the specific version of Phalcon from its GitHub repository.
Code:
cd /usr/local/src
git clone -b v3.4.5 --single-branch https://github.com/phalcon/cphalcon.git
Step 3: Compile Phalcon
1. Prepare the Build Environment: Use `phpize` to prepare Phalcon for compilation. Make sure to specify the path for the PHP 7.3 `phpize` and `php-config`.
Code:
cd cphalcon/build/php7/64bits
/usr/local/php73/bin/phpize
2. Configure the Compilation: Run the `./configure` script, pointing to your PHP 7.3 `php-config`.
Code:
./configure --with-php-config=/usr/local/php73/bin/php-config
3. Compile and Install: Compile the Phalcon extension and install it.
Code:
make && make install
Step 4: Enable Phalcon in PHP 7.3
1. **Configure PHP**: Add the Phalcon extension to your PHP 7.3 configuration.
- Find the PHP 7.3 `php.ini` file. You can usually find this path by running `/usr/local/php73/bin/php --ini`.
- Add the following line to your `php.ini`:
For me it was like:
Code:
nano /usr/local/php73/lib/php.ini
Be sure that you removed ; before extension=phalcon.so or type it directly without ;
Code:
extension=phalcon.so
Then Save with Ctrl + Y and Enter
Step 5: Restart the Web Server
- Restart Apache or PHP-FPM to apply the changes. The command depends on your server setup:
- For Apache:
Code:
service httpd restart
- For PHP-FPM:
Code:
service php-fpm73 restart
For LiteSpeed
Code:
sudo service lsws restart
Step 6: Verify Installation
- Confirm that Phalcon is installed correctly:
Code:
/usr/local/php73/bin/php -m | grep phalcon
This process assumes a certain level of access and control over your DirectAdmin environment and might require adaptations based on your specific server setup, PHP configurations, and how PHP extensions are managed on your system. Always back up your configurations before making significant changes.
For the most accurate and detailed instructions, consult DirectAdmin's official documentation, the CustomBuild script documentation, or seek assistance from the DirectAdmin community forums, especially if you encounter issues specific to your server environment.