Fanmade Fanmade - 3 months ago 15
Linux Question

Trying to update phalcon to 3.0 on Debian 8 v-server

First of all: I only know some basics on linux, but I wanted to try out Phalcon. So I've rented a small v-server with Debian 8 and installed php7.
At the time phalcon was at version 2.1.0r and I followed the tutorials until it seemed to work. Then I've had no time to really start working on it anymore (just created the first to 2 controllers from the tutorial).
Now I do have an idea for a test project and a little time, but I've seen that Phalcon 3.0 is out.

So I went into my cphalcon folder and got the 3.0 branch via git.
With

git status
I get
Your branch is up-to-date with 'origin/3.0.x'.


Then I switched to the "build" folder and ran
sudo ./install
.
The process ran through without any errors and both
/usr/include/php/20151012/ext/phalcon/php_phalcon.h
and
/usr/lib/php/20151012/phalcon.so
are shown as recently updated within their respective folders.

In
/etc/php/7.0/fpm/conf.d
I do have a link called
30-phalcon.ini
that points to
/etc/php/7.0/mods-available/phalcon.ini
containing only the line
extension=phalcon.so


Then I've restarted the server via
/etc/init.d/nginx restart
.
When I run phpinfo(), it does still show phalcon version
2.1.0r
though.

I'll try to get a linux training, but I'd love to try starting on Phalcon until then



The solution:
First, I recompiled via zephir, then I restarted php.

$ cd cphalcon/
$ zephir fullclean
$ zephir compile
$ cd build/
$ sudo ./install
$ /etc/init.d/nginx restart
$ /etc/init.d/php7.0-fpm restart


I don't know if I needed to do all this, but it worked and I'm happy. Thank you all.

Answer

For dev branches, e.g 3.0.x always use Zephir:

# PHP 5
$ zephir fullclean
$ zephir build

# PHP 7
$ zephir fullclean
$ zephir build --backend=ZendEngine3
Comments