Phalcon 3.x installation issue on PHP7

I installed last phalcon version on php 5.6 and works great.

But i couldnt install for php7 on same server because of i couldnt find phalcon.so file in /root/cphalcon/build/php7/64bits/ folder.

How can i install for php7, what missing?

  • CentOS release 6.8 (Final)
  • Apache 2.4
  • PHP 7.0.10


64.2k

how did you try to install it

did you check package could service that phalcon provides https://forum.phalconphp.com/discussion/13265/phalcon-on-packagecloudio

but probably php, phpize and php-config are not set to use php7 ones.

$ which php
$ which phpize
$ which php-config
edited Sep '16

I used following commands:

git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install

What should i do exactly?



64.2k

if you type in the console

which php
which phpize
which php-config

what do you get ?

edited Sep '16

which php

/usr/local/bin/php

which phpize

/usr/local/bin/phpize

which php-config

/usr/local/bin/php-config


64.2k

yea, you have to update those I use ubuntu so i have to idea how does it work on CentOS.

in ubuntu its

cd /etc/alternatives;

ll | grep "php"

inside you should be able to see your shortcuts.

but before you edit them.

try editing your ~./.bashrc file

php=my path to php7/bin/php
phpize=my path to php7/bin/phpize
php-config=my path to php7/bin/php-config

try again which to make sure its there. Also php -v should say 7.0.10 .. or whatever it was.

they try installing again.

you can remove those configs in your bashrs after that.

The idea is that php extensions needs to be directed to the php-config file and they use it while compiling.

edited Sep '16

What php -v and phpize -v return ?

php -v

PHP 5.6.25 (cli) (built: Aug 25 2016 16:20:05)

phpize -v

Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226

I upgraded EasyApache4 and using multi-php version. PHP 5.6 is inherit. I assigned PHP 7 a domain for test. I tried to install phalcon 3.x for php7 but couldnt achive.

edited Sep '16

As you see you have php 5.6. Just install php 7 and php7-dev. In cli. To compile phalcon you must be sure that you php -v and phpize -v return correct versions for php 7.

Solution was posted above by @Izo



19.6k

Take a look on my post, for me it works perfectly:

https://forum.phalconphp.com/discussion/13169/centos-7-and-plesk-multiple-php-version
edited Sep '16

you can give a shot with my compiled version of phalcon.so. It might work

https://github.com/magnxpyr/phalcon.so/releases/tag/phalcon3.0.0-centos6.7

But he already have compiled phalcon, just for php 5.

If i set the default php version as 7 from WHM and re-compile for php7 and set back default php version as 5.6. Both version will work?

edited Sep '16

should work as long as each php version link to the right phalcon.so file

So i can delete /root/cphalcon/ folder after moved phalcon.so file into to extensions folder of right php version. Right?

edited Sep '16

that's correct. If doesn't work, you might also have to add the path of phalcon.so in php.ini