We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Ubuntu 14.04, Plesk, Php 7.0.14

Hello community,

sadly I have some trouble setting up phalcon on a ubuntu server. The server ist managed via Plesk and there are multiple Php-Versions enabled which may cause some trouble?

I am using php 7.0.14 in cli (php -v), and using "sudo apt-get install php7.0-phalcon" seems to work just fine, no errors or anything.

When using phpinfo(); the phalcon.ini gets loaded (/opt/plesk/php/7.0/etc/php.d/phalcon.ini), but there does not show up a phalcon section.

I have tried to use "phpenmod phalcon" which sadly changes nothing.

I would appreciate any kind of help

Best Regards, Ludwig



85.5k
Accepted
answer

you should compile phalcon yourself.

cd /home/user/; #whatever
git clone https://github.com/phalcon/zephir.git
cd zephir
./isntall -c

cd /home/user #whatever
git clone https://github.com/phalcon/cphalcon.git

cd /etc/alternatives;
ll | grep php

# here you need to fix php, php-config and phpize

rm php
rm php-config
rm php-config

ln -s YOUR_PHP_PATH_/bin/php /etc/alternatives/php
ln -s YOUR_PHP_PATH_/bin/php-config /etc/alternatives/php-config
# same for phpize

cd /home/user/cphalcon;

zephir build --zendEngine=3

//once done go to phpinfo(); in your page, check where is your php.ini

vim/mcedit/nano whatever you are using ....php.ini at the bottom add extension=_FULL_)PATH_TO_YOUR_PHP/lib/php/extension/...whatever.,../phalcon.so

dont forget to restart apache,nginx, fpm or whatever you are using

And voya you are ready. Happy phalconing :D

I neither have php-config nor phpize, thats probably a problem? where do I get those? seems like they are not installable packages with apt-get install.

Anyway thanks for your quick answer and I will keep trying. :)

So I installed php7.0-dev libpcre3-dev gcc and got "phpize" and "php-config".

Sadly they are not in the path the apache php version uses.

/opt/plesk/php/7.0/...

And I guess thats the reason because my installation of phalcon goes into "/usr/lib/php/20151012/phalcon.so" and linking this file from /opt/plesk/php/7.0/etc/php.ini seems to be not working :(

Something with the linking went wrong, after following those steps again it works now, thanks for your help.