Raspberry Pi, PHP 7 and Phalcon 3.x

For all the folks out there having issues to compile or setup Phalcon AND latest PHP 7 here's the info.

On my new Raspberry Pi 3B, I successfully installed the full stack...

ARM arch :) Distro: Raspbian GNU/Linux 8.0 (jessie)

  • PHP Version 7.0.10 compiled from source (it took ~90 minutes, but my SD card is very slow on writes anyway)
  • Phalcon 3.0.1 compiled from source
  • nginx/1.6.2 fetched from default distro repo since nginx repo does not have ARM support, but you can compile on your own v1.10.x if needed at all
System  Linux raspberrypi 4.4.13-v7+ #894 SMP Mon Jun 13 13:13:27 BST 2016 armv7l
Build Date  Sep 5 2016 02:39:46
Server API  FPM/FastCGI
 with Zend OPcache v7.0.10

phalcon
Author  Phalcon Team and contributors
Version     3.0.1
Build Date  Sep 5 2016 10:51:12
Powered by Zephir   Version 0.9.4a-dev-7e304ba18c

Everything working fine! :)

Nice to hear! On my Pi it doesn't compile with a "compiler error". Can you please share with me the ready-made phalcon.so?

I don't think it'll work that way. Shared Object (SO) has system wide dependencies, only if we have used the exact same setup, for instance I could have libcurl at compile time and you might not have it etc.

You should not get a compiler error, check what's going on. Whcih PHP version? Phalcon version? RPi version? Are you missing some requred libs?

I'll post the output later (at work now, and the RPi is at home). For me, this trick once worked with Phalcon: I had a somewhat different setup on my web hosting server than that on my laptop, but I was able to simply copy the phalcon.so and it worked. I could not compile it directly on the hosting server because it is a VM with just 256Mb of RAM. Apparently, as long as the arch and the major PHP version are the same, it might be compatible (or might be not, but let's see). Actually, on my home RPi it also could be a matter of memory lack: I forgot that it also runs Kodi player (and thus, the whole X). I will try to run it without having X consuming system resources and report the results back. As for the Pi, I have the 3rd model, with 1Gb of RAM, PHP-7, and I surely have all the requirements to compile phalcon. In fact, --configure runs fine, it starts the compilation process but then fails after ~40 minutes at compiling phalcon.o.

  1. Simply cd cphlacon/build and run "sudo ./install" didn't help.
  2. Installed Zephir, then cd cphalcon, zephir fullclean, zephir build
  3. Profit!