While the following suggestion doesn't really compile and install Phalcon on the Synology OS it will make it possible to run it on the hardware.
How about compiling and installing phalcon in Debian Chroot (available in Community repo)?
I'm running several services on my debian environment on my DS414 and DS211j without trouble.
Following this thread i decided to install a LAXP (db on other machine in network) stack in the chroot.
I created a mount between /{VOLUME}/web/ and /var/packages/debian-chroot/target/var/chroottarget/mnt/web (/mnt/web in chroot) so apache and php can see the files.
I assigned port 81 to Apache in chroot since Synology keeps grabbing port 80
I've migrated a couple of domains to the Synology for testing:
https://l.has.moe is a website which is running on the Synology with Phalcon
CONS:
-
You will not be able to manage the webserver from the Synology interface
-
Chroot cannot run on port 80, Synology will keep trying to get this port back for its own http server
-
The overhead of chroot IF you're only going to run the stack (in my case is this void since i run more things)
- Permissions can get confusing
Before continuing, install Debian Chroot and make sure it runs.
You can check this by running '/var/packages/debian-chroot/scripts/start-stop-status status', you should get the status back.
- Create an empty directory for the mount
mkdir /mnt/web
SWITCH TO DSM SHELL
- Mount the webroot directory with chroot target
mount --bind /{VOLUME}/web /var/packages/debian-chroot/target/var/chroottarget/mnt/web
BACK TO CHROOT
-
Install Apache2 and PHP
apt-get install apache2 php5 libapache2-mod-php5
-
Change the Apache2 Chroot ports in /etc/apache2/ports.conf
80 => 81
443 => 444
-
Download, compile and install Phalcon as instructed on the download page
- Note: instead of simply adding "extension=phalcon.so" to php.ini i followed the new convention
by creating a new file /etc/php5/apache2/conf.d/10-phalcon.ini with "extension=phalcon.so" as content
-
If you don't have a (phalcon powered) PHP site, create a new directory in /mnt/web (in this case "phalcondsm")
- Restart apache and you're done with the basics
service apache2 restart
I've succesfully setup a LAXP stack on my Synology with Debian Chroot.
It's running pretty smoothly.