Instal on managed Server ( change php cli version)

Hey,
I’m trying to install Neos on a managed server where I have restricted access. ( sudo is complete disabled)
What I’ve done;

  1. get composer.phar
  2. create neos project via composer

Where I Stuck;
The default php interpreter(4.4.9) is been used by flow even I add the 7.1 cli in Configuration/Settings.yaml

When I try to install Neos, url/setup it redirects me to url(setup/index)
the output is :
X-Powered-By: PHP/4.4.9
Content-type: text/html

Settings.yaml config
Neos:
Flow:
core:
phpBinaryPathAndFilename: /usr/local/bin/php7.1.10-cli

Any ideas how to change the php version.
Thank you.

Hi @alchalade

You say PHP 4.4.9? It was last released 9 years ago, and I believe that it’s not even possible to install Flow with that version due to version checks.

Did the composer install command download and setup the file structure correct? And is php7.1.10 available on the path your have provided in Settings.yaml?

TL;DR: Set the correct PHP version for web access.


When I try to install Neos, url/setup it redirects me to url(setup/index)
the output is :
X-Powered-By: PHP/4.4.9
Content-type: text/html

Here you are accessing the Neos setup via HTTP. Typically hosting providers that support multiple PHP versions let you choose the PHP version that gets used by the (HTTP) web server. That is normally done via a web interface. In your case that is still something very ancient and needs to be addressed.

The default php interpreter(4.4.9) is been used by flow even I add the 7.1 cli in Configuration/Settings.yaml

The setting you mentioned here instructs Neos which PHP interpreter to use on the command line - that is cli commands and sub-requests. It must match the version used by the webserver, and both must meet the general Neos requirements.

Thank you for the answers.

@tantegerda1
The weird part was, php info said “I’m php 7.1”

phpinfo();
die;

in Web/index.php.

I set the PHP version via .htaccess ( the only way according to my provider) and gave the path to the same version of the cli in settings.yaml but unfortunately it didn’t work.

After I gave up to find a similar case, I began to hack around.

I override a setting parameter in Packages/Framework/Neos.Flow/Classes/Core/Booting/Scripts.php

$settings['core']['phpBinaryPathAndFilename']='/usr/local/bin/php7.1.10-cli'

and it worked.

The thing which wonders me is, all other settings are there (db host, username, etc)except the path for cli.