Applicable to:
- Plesk for Linux
Question
How to install Phalcon framework for a PHP supplied by Plesk?
Answer
Note: Such kind of setup is not possible to set via Plesk Interface and this task should be performed by a system administrator via SSH.
Before performing the following actions make sure that required packages such a 'git' or 'build-essential' are installed and functioning properly.
-
Connect to the server via SSH.
-
Install the following packages and their dependencies.
-
For RHEL/CentOS/CloudLinux:
# yum install plesk-php*-devel pcre-devel gcc make
-
For Debian/Ubuntu:
# apt-get install plesk-php*-dev
-
-
Clone phalcon git repo
# git clone -b '3.4.x' git://github.com/phalcon/cphalcon.git
-
Go to cphalcon/build folder:
# cd cphalcon/build
-
Run 'install' binary with appropriate options:
# ./install --phpize /opt/plesk/php/7.0/bin/phpize --php-config /opt/plesk/php/7.0/bin/php-config
Note: Pay attention to paths to
phpize
andphp-config
specified in the command. If you install phalcon for some other PHP version, path should be set properly. -
Create
/opt/plesk/php/7.0/etc/php.d/phalcon.ini
configuration file with the following content:# echo 'extension=phalcon.so > /opt/plesk/php/7.0/etc/php.d/phalcon.ini
-
Make sure phalcon module is loaded fine.
# /opt/plesk/php/7.0/bin/php -m | grep phalcon
phalcon
For more details refer to official guide by Phalcon Framework: https://github.com/phalcon/cphalcon
Comments
3 comments
Hello @xdev,
Please make sure that the default system repositories for Ubuntu 18 are configured in /etc/apt/sources.list file:
CONFIG_TEXT: deb http://archive.ubuntu.com/ubuntu bionic main restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner
If the solutions is not helpful, please contact Plesk support for assistance:
https://support.plesk.com/hc/en-us/requests/new
OK, maybe you also need to:
- Install the required handler versions, in that case for PHP 7.2:
"plesk installer --select-release-current --install-component php7.2"
- Install the C/C++ linkers & compilers (package "build-essential", before executing the "./install ..." command)
- Install GIT (package "git", before phalcon git pull command)
Hello xdev,
Thank you for pointing our attention on that. The article updated with appropriate notation.
Please sign in to leave a comment.