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

how install php 7 + phalcon 3.0 on ubuntu 14.04

I was updated from repo to phalcon 3.0.0 and all worked. After that installed php 7.0.9 and php not see phalcon. I may reinstall phalcon 3.0 but only for php 5. When i try sudo apt-get install php7.0-phalcon - cann't find. How install it from repo with support php7 without upgrate ubuntu to 16.04?

edited Aug '16

I am using this to install phalcon:

git clone --depth=1 git://github.com/phalcon/cphalcon.git

cd cphalcon/build

sudo ./install

sudo touch /etc/php/7.0/fpm/conf.d/30-phalcon.ini

sudo echo "extension=phalcon.so" > /etc/php/7.0/fpm/conf.d/30-phalcon.ini

sudo touch /etc/php/7.0/cli/conf.d/30-phalcon.ini

sudo echo "extension=phalcon.so" > /etc/php/7.0/cli/conf.d/30-phalcon.ini

for further instructions you may look at my github repository which is dedicated to create a small and lightweight phalcon vagrant box with nginx, php7 and phalcon 3.0 which works but I am still working on it: https://github.com/LudwigBr/vagrant_phalcon/blob/master/init.sh



85.5k
edited Aug '16

the best way to use phalcon is to use zephir.

cd /home/my user/

git clone https://github.com/phalcon/zephir.git zephir;

cd zephir;

./install -c

zephir //just to make sure its working it should print you some crap, if not source ~/.bashrc.

//then you can take a look at ll /etc/alternatives | grep "php"
// the idea is that when you type which php,php-config, phpize should be the php7 ones. So my php7 is located at  /opt/php-7004
//so here is my grep 

lrwxrwxrwx   1 root root    21 Jul 27 15:34 php -> /opt/php-7004/bin/php*
lrwxrwxrwx   1 root root    17 Feb 19  2015 php-cgi -> /usr/bin/php5-cgi*
lrwxrwxrwx   1 root root    28 Jul 27 15:34 php-config -> /opt/php-7004/bin/php-config*
lrwxrwxrwx   1 root root    24 Jul 27 15:34 phpize -> /opt/php-7004/bin/phpize*

//in order to replace a executable, 

rm php
ln -s /MY VERY FULL PATH TO php7/bin/php /etc/alternatives/php

Once that done, cd zephir/parser; 
make clean
phpize --clean;

git clone phalcon

cd phalcon;

zephir build --zendEngine=3
//this will automatically install the extension in your php7 dir in my case i have this is my php.ini

extension=/opt/php-7004/lib/php/extensions/no-debug-non-zts-20151012/phalcon.so

//service apache/nginx restart and that it.

keep in mind that replacing php in /etc/alternatives wil make php -v ( show you the php7 one ) if you ever need to use the php5 one, just replace the file again.

Alternative way is to modify your PATH, probably its easiest way. You can check google.

I havent try this with 3.0 but...

git clone https://github.com/phalcon/cphalcon
cd cphalcon/build/64bits  # <OR> cd cphalcon/build/32bits
make clean
phpize --clean
$YOUR_PHP_INSTALLATION_PATH/bin/phpize  # Example: /opt/php-5.6.15/bin/phpize
./configure --with-php-config=$YOUR_PHP_INSTALLATION_PATH/bin/php-config # Example: ./configure --with-php-config=/opt/php-5.6.15/bin/php-config
make && sudo make install

also check here https://phalcon.io/bg/download



17.6k

it's vps on digitalocean with 512ram - cann't compile sources or use vagrant



17.6k

It will be create phalcon.so for php5. that allready exists

I am using this to install phalcon:

git clone --depth=1 git://github.com/phalcon/cphalcon.git

cd cphalcon/build

sudo ./install

sudo touch /etc/php/7.0/fpm/conf.d/30-phalcon.ini

sudo echo "extension=phalcon.so" > /etc/php/7.0/fpm/conf.d/30-phalcon.ini

sudo touch /etc/php/7.0/cli/conf.d/30-phalcon.ini

sudo echo "extension=phalcon.so" > /etc/php/7.0/cli/conf.d/30-phalcon.ini

for further instructions you may look at my github repository which is dedicated to create a small and lightweight phalcon vagrant box with nginx, php7 and phalcon 3.0 which works but I am still working on it: https://github.com/LudwigBr/vagrant_phalcon/blob/master/init.sh