contao/contao-manager

Wrong PHP version / path

Closed this issue · 11 comments

Hey.
There have been couple of threads here, but everything was more or less closed because of a stale issue.

The problem is that we are using WHM and on each we have different accounts / domains; some of them use contao 3, some 4, and now we are trying to bring life to contao 5.

Default System PHP version is 8.1.

Even if we set account / domain version to PHP 8.2, in this project (contao 5) Contao Manager will still only detect PHP 8.1 (binary path which can't be changed in Contao Manager Server config field).

Did you guys found any good solution durning all this time?

image

Screenshot 2024-07-09 at 18 01 46

(binary path which can't be changed in Contao Manager Server config field).

What do you mean? Why can't it be changed?

(binary path which can't be changed in Contao Manager Server config field).

What do you mean? Why can't it be changed?

After changing from ea-php81 to ea-php82 and pressing Save, I can't get pass this
image

Even if we set account / domain version to PHP 8.2, in this project (contao 5) Contao Manager will still only detect PHP 8.1

You need to double check that. Because if the Contao Manager detects that PHP 8.1 is in use for the web process, then you have indeed only set PHP 8.1 for the web process for that domain.

Even if we set account / domain version to PHP 8.2, in this project (contao 5) Contao Manager will still only detect PHP 8.1

You need to double check that. Because if the Contao Manager detects that PHP 8.1 is in use for the web process, then you have indeed only set PHP 8.1 for the web process for that domain.

I have quadro checked :) WHM and also in cpanel account / domain, everything is set to 8.2 for this account / domain.
But overall default server PHP version is set to 8.1, that is why I was wondering if someone had similar experience.

Is the manager.json automatically re-written each time?
Since I have changed php_cli to php82, but nothing had any effect - if this file even is relevant for this issue.

I have quadro checked :)

Check it again the following way:

  • Create a public/pi.php file with the content <?php phpinfo();
  • Open <your-domain>/pi.php in your browser.
  • Check the PHP version at the very top.

After some switching php versions in WHM now Contao Manager uses PHP 8.2 (PHP web process and Server config).
Also pi.php shows PHP 8.2.
image

But after trying to install dependencies / next step from above screen shot, this error occurred.

image

now Contao Manager uses PHP 8.2

It solely depends on what your web server is using. Clearly your web server used the wrong PHP version before, as you were able to now independently check.

now Contao Manager uses PHP 8.2

It solely depends on what your web server is using. Clearly your web server used the wrong PHP version before, as you were able to now independently check.

Yes, what ever we check, everything it says PHP 8.2. but as you can see Composer still has some issues with PHP version. Do you maybe know where could be a problem?

Post the output of /usr/local/bin/php -v, executed under the same user as the web process.

Thank you @fritzmg
There seems to be a problem within server, after restarting it, all was in the right place.