We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Compiling Phalcon 3 under a different PHP version

I am running a server with Plesk which supports multiple PHP versions. Some websites run the default Ubuntu PHP 5.6.20 and others the PHP 7.0.9 that comes with Plesk.

I am trying to install Phalcon 3 on the 7.0.9 and for that I have added the following to the root .bashrc and rebooted:

export PATH="/opt/plesk/php/7.0/bin:$PATH"

This way php -v shows 7.0.9 instead of 5.6.20.

However, when I run ./install, it still compiles Phalcon for the old 5.6.20. It shows up on phpinfo for 5.6.20 but not for 7.0.9. If I run php -v now it returns some errors (because it was compiled for an older PHP of course). Anyone?



1.7k

As far as I know, you should also add phpize v7.0.9 to PATH.



85.5k
Accepted
answer

if you are using ubuntu ( or debian, i am no master of those naming stuff )

ll /etc/alternatives | grep "php"

you need to replace php, phpize, php-config.

probably its the same if you export those in you PATH

In case someone else has the same problem with Plesk, it provides a package that adds the necessary phpize and php-config to bin.

apt-get install plesk-php70-dev