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

Problems installing Phalcon3 on Ubuntu 14.04 with PHP7

I've gotten past a few hurdles, but can't seem to get over this one.

I have phalcon installed and enabled. phpinfo() reads:

under "Additional .ini files parsed": /etc/php/7.0/apache2/conf.d/30-phalcon.ini

phalcon also shows up running get_loaded_extensions(); [41] => phalcon

The problem I'm facing now is I can't composer install/update. Here is my composer.json file:

     {
        "require": {
            "php" : ">=7.0.0",
            "ext-phalcon" : ">=3.0.0"
        }
    }

The error I get when running composer install and/or update is:

Your requirements could not be resolved to an installable set of packages.

Problem 1 The requested PHP extension ext-phalcon >=3.0.0 is missing from your system. Install or enable PHP's phalcon extension.

I've also changed "ext-phalcon" to "phalcon" with the same results.

edited Aug '16

Hi

Try

"ext-phalcon" : ">=3.0.x"

OR

"ext-phalcon" : ">=3.0.*"


17.5k

[UnexpectedValueException] Could not parse version constraint >=3.0.x: Invalid version string "3.0.x"

and

[UnexpectedValueException] Could not parse version constraint >=3.0.: Invalid version string "3.0."

"ext-phalcon": "^3.0"


17.5k

I'm not at work anymore and I haven't tried this suggestion, but I don't think it will work. It seems like Composer can't find the phalcon extension and I'm not sure why. phpinfo() shows it's there and enabled. Anyway, I'll try the ^3.0 value and see if it works. Weird problem though... I don't get it & the google usually solves most of my issues, but not this one.



85.5k
edited Aug '16

i guess php -v says php5

ll /etc/alternatives/ | grep "php"

you can see there isphp -> /usr/bin/php or whatever i dont remember the exact path.

you need to change this to your php7 executable. for me is

php -> /opt/php-7004/bin/php*

2 ways you can do that, by using $PATH in you .bashrc or

cd /etc/alternatives;
rm php;
ln -s /opt/php-7004/bin/php /etc/alternatives/php

in the last command this is my path, you need to say the full path to yours.

YOu can google $PATH ubuntu if you are not familiar ( i also havent try it , but it should work )

CHeers



17.5k

"ext-phalcon":"^3.0"

Problem 1

  • The requested PHP extension ext-phalcon ^3.0 is missing from your system. Install or enable PHP's phalcon extension.

php -v

[email protected]:/var/www/html$ php -v PHP 7.0.10-1+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.10-1+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies

ll /etc/alternatives/ | grep "php"

lrwxrwxrwx 1 root root 21 Aug 24 22:11 libphp5 -> /usr/lib/libphp5.5.so lrwxrwxrwx 1 root root 15 Aug 24 21:43 php -> /usr/bin/php7.0 lrwxrwxrwx 1 root root 31 Aug 24 21:43 php.1.gz -> /usr/share/man/man1/php7.0.1.gz lrwxrwxrwx 1 root root 22 Aug 26 19:07 php-config -> /usr/bin/php-config7.0 lrwxrwxrwx 1 root root 38 Aug 26 19:07 php-config.1.gz -> /usr/share/man/man1/php-config7.0.1.gz lrwxrwxrwx 1 root root 18 Aug 26 19:07 phpize -> /usr/bin/phpize7.0* lrwxrwxrwx 1 root root 34 Aug 26 19:07 phpize.1.gz -> /usr/share/man/man1/ph ize7.0.1.gz

Do I need to do something about libphp5.5.so?

php -version | head -1

Here is a switch to 7.0 then back to 5.5

if you get PHP 5.5.x, make this command:

update-alternatives --set php $(sudo update-alternatives --list php | grep "php7.0")

"ext-phalcon":"^3.0"

Problem 1

  • The requested PHP extension ext-phalcon ^3.0 is missing from your system. Install or enable PHP's phalcon extension.

php -v

[email protected]:/var/www/html$ php -v PHP 7.0.10-1+deb.sury.org~trusty+1 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies with Zend OPcache v7.0.10-1+deb.sury.org~trusty+1, Copyright (c) 1999-2016, by Zend Technologies

ll /etc/alternatives/ | grep "php"

lrwxrwxrwx 1 root root 21 Aug 24 22:11 libphp5 -> /usr/lib/libphp5.5.so lrwxrwxrwx 1 root root 15 Aug 24 21:43 php -> /usr/bin/php7.0 lrwxrwxrwx 1 root root 31 Aug 24 21:43 php.1.gz -> /usr/share/man/man1/php7.0.1.gz lrwxrwxrwx 1 root root 22 Aug 26 19:07 php-config -> /usr/bin/php-config7.0 lrwxrwxrwx 1 root root 38 Aug 26 19:07 php-config.1.gz -> /usr/share/man/man1/php-config7.0.1.gz lrwxrwxrwx 1 root root 18 Aug 26 19:07 phpize -> /usr/bin/phpize7.0* lrwxrwxrwx 1 root root 34 Aug 26 19:07 phpize.1.gz -> /usr/share/man/man1/ph ize7.0.1.gz

Do I need to do something about libphp5.5.so?



17.5k
edited Aug '16

Ran the command: php -version | head -1

I see this: PHP 7.0.10-1+deb.sury.org~trusty+1 (cli) ( NTS )

Ran the command: update-alternatives --set php $(sudo update-alternatives --list php | grep "php7.0") command

Ran the command: ll /etc/alternatives/ | grep "php"

Now I see this:

lrwxrwxrwx  1 root root   21 Aug 24 22:11 libphp5 -> /usr/lib/libphp5.5.so
lrwxrwxrwx  1 root root   15 Aug 24 21:43 php -> /usr/bin/php7.0*
lrwxrwxrwx  1 root root   31 Aug 24 21:43 php.1.gz -> /usr/share/man/man1/php7.0.1.gz
lrwxrwxrwx  1 root root   22 Aug 26 19:07 php-config -> /usr/bin/php-config7.0*
lrwxrwxrwx  1 root root   38 Aug 26 19:07 php-config.1.gz -> /usr/share/man/man1/php-config7.0.1.gz
lrwxrwxrwx  1 root root   18 Aug 26 19:07 phpize -> /usr/bin/phpize7.0*
lrwxrwxrwx  1 root root   34 Aug 26 19:07 phpize.1.gz -> /usr/share/man/man1/ph ize7.0.1.gz

Ran composer update and am still getting:

Problem 1
- The requested PHP extension ext-phalcon >=3.0.0 is missing from your system. Install or enable PHP's phalcon extension.

Thinking I'm going to give up on PHP7 for now... Need to get this dev environment running. :(



85.5k
edited Aug '16

add me at skype: ***** or use


php composer.phar update --ignore-platform-reqs

its easy :D , no givving up is allowed !



17.5k

Ha, I did give up and it took me all of 3 hours to build a new vagrant VM, install Phalcon 3 and get my hello world working. It's not necessary to be on PHP7 and judging from how little support there is for it, I'm not super keen on using it for an enterprise production environment right now.

I appreciate the help, nonetheless... From everyone.