We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Two installations in same machine

Is possible have two (or many) installations of Phalcon in the same machine ? For example, v2.10 and v3.0.


yes, diffrent php version served by your apache/nginx/fpm

just change what which php, phpize, php-config are showing

edited Dec '16

@Izopi4a: Why he would need different PHP versions? Both Phalcon 2.0.x and 3.0.x can be served by PHP5.6 for instance.

@ramiromd: Phalcon v.2.1.x should not be used at all as it never existed officialy! Only 2.0.x if you have legacy PHP (i.e. 5.4) or LTS 3.0.x stable release.

Serving multiple Phalcon projects is exactly the same as with any other framework or app. All you need is proper vhost (nginx) configuration.


phalcon is a group of classes, you cant have 2 phalcon\di classes at the same time. If he edit all the namespaces from git and compile it he can manage to have phalcon2 and phalcon3 classes for example ?

and they can both be whatever version he desires but they will be different instances

edited Dec '16

Uh-oh. I misunderstood the OP question. I was thinking about PHP versions, and not Phalcon versions. :)

The other way around - if he can get two separate PHP instances working (in my case PHP 5.6 and PHP 7.0.x), it could be that PHP 7 compiles with Phalcon 3.0.x while PHP 5.6 will have compiled Phalcon 2.0.x.

But... the entire purpose of this is not clear, and IMHO is a bad approach for multiple reasons.

You can install two php and two phalcon in your machine in different dirs.