Control Web Panel

WebPanel => PHP => Topic started by: krasipetrov on January 03, 2020, 12:08:56 PM

Title: PHP install Phalcon extension
Post by: krasipetrov on January 03, 2020, 12:08:56 PM
Hi, all!

I've been using cwp for a few months now and am impressed with it. I'm in love!

I have one question. I have projects that are written on a Phalcon framework(phalcon.io)and I need to submit them to the server. The problem is I have to install the Phalcon extension for PHP without breaking the server because it has projects in production :D.

Has anyone done it and can they share some information on how I could do it?
Title: Re: PHP install Phalcon extension
Post by: Igor S. on January 03, 2020, 03:51:25 PM
Hi. It must be installed from source https://github.com/phalcon/cphalcon and I believe you have to talk to a system administrator for the installation.
Title: Re: PHP install Phalcon extension
Post by: krasipetrov on January 03, 2020, 05:42:22 PM
Hi. It must be installed from source https://github.com/phalcon/cphalcon and I believe you have to talk to a system administrator for the installation.

Hi. Thanks for answer.

I'am the system administrator :D and I wanted to install and use it.
Title: Re: PHP install Phalcon extension
Post by: krasipetrov on January 04, 2020, 06:17:31 PM
Everything is ready. I did the installation. I write how, because it may be useful.

First weed need to install re2c.
Open opt directory and download package:
Quote
curl http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/r/re2c-0.14.3-2.el7.x86_64.rpm --output re2c-0.14.3-2.el7.x86_64.rpm

Install:
Quote
rpm -Uvh re2c-0.14.3-2.el7.x86_64.rpm


Now, wee need to install psr. Psr is required for phalcon extension. Instruction for installation from https://github.com/jbboehr/php-psr:

Quote
git clone https://github.com/jbboehr/php-psr.git
cd php-psr
phpize
./configure
make
make test
sudo make install

Now, we install phalcon extension:

Quote
$ cd /opt/
$ git clone https://github.com/phalcon/cphalcon.git
$ cd cphalcon/build
$ sudo ./install

Wait for installation finish. Now, wee need to edin php.ini file and add this lines:

Quote
extension=psr.so
extension=phalcon.so

that is all