Thứ Tư, 1 tháng 6, 2022

How to install Phalcon framework for a PHP Plesk?

 

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.

  1. Connect to the server via SSH.

  2. 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

  3. Clone phalcon git repo

    git clone -b '3.4.x' git://github.com/phalcon/cphalcon.git

  4. Go to cphalcon/build folder:

    cd cphalcon/build

  5. 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 and php-config specified in the command. If you install phalcon for some other PHP version, path should be set properly.

  6. 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

  7. 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

Share This!


Không có nhận xét nào:

Đăng nhận xét