0

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.

Fanmade
  • 307
  • 4
  • 14
  • 1
    run the command `sudo service php7-fpm restart` to restart your PHP service. Then the updated phalcon version should be applied. – Timothy Aug 22 '16 at 16:44

2 Answers2

2

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
serghei
  • 3,069
  • 2
  • 30
  • 48
  • `zephir build --backend=ZendEngine3` zephir already detects backend, this is only needed as far as i know if we want to generate php7 extension code while being on php5. At least i both on php5 and php7 using just zephir build – Juri Aug 22 '16 at 19:39
1

Service php7-fpm restart ? Nginx is not php handler, it's fpm which handles php.

Juri
  • 1,369
  • 10
  • 16