Installation via git/composer fails, wrong php-version?

Hi,

I just tried again to install elgg with composer, to test the newest beta version, too. But I have the following issue:

The link to the image: http://s29.postimg.org/je3xsvqx3/projectelggcomposer.png

So my main problem seems to be, that the wron php-version is installed, correct? I use everal php-version on the server (atomic) and on this domain I use php 5.6 (and that works with other software, e.g. shopsoftware "shopware" which needs php 5.6 too). So what could be the problem here?

Thanks!
 

  • Yes, it looks like you're using the wrong php version (it's detecting 5.4.44)

  • Yes I know, but I don't! Via Plesk I have configured this domain to PHP 5.6 (Multiphp on this server, atomic), and it works for other software perfectly. Maybe this is an issue of elgg, wrong detecting, because it only searches for the global default version of php? On my server I work with CentOS, and its per default released with PHP 5.4, but you can change via plesk the local php-version (as said, working with other software, which also requires higher php versions).

  • Are you sure you have restarted the server after configuring it to use PHP 5.6?

  • Yes I did. And the local php version is correctly shown as PHP 5.6. I do not know why elgg does not detect it correctly. No problem here with the other software, which also needs PHP 5.6. What else could be the reason?

  • What do you get if you do the command:

    php --version
  • Version on CLI might be very well different, you can check it by typing in console:

    php -v

    If you're sure that your webserver will use proper version, you can ignore environment check by using:

    composer install --ignore-platform-reqs

  • php -v gives the global default installed php 5.4 of CentOS, which does not matter. I installed now Elgg 2.0.0-beta.2 from files - no problem AND afterswars the php-version is correctly shown in Statistics->ServerInfo as 5.6.12, so the detecting during the install is really buggy. No matter, I have installed it now and will try it out :)

  • It's not buggy, it's detecting CLI version because there's no way of telling what version is used by web server. In normal deployments you don't keep unused php builds around, so it's reasonable to assume that it'll be the same on cli and within webserver, but for cases like yours there's a flag in composer install to skip that check.

  • Ok, thank you very much! Everything works now, already testing.