Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong PHP version / path #820

Closed
xApep opened this issue Jul 9, 2024 · 11 comments
Closed

Wrong PHP version / path #820

xApep opened this issue Jul 9, 2024 · 11 comments

Comments

@xApep
Copy link

xApep commented Jul 9, 2024

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

@xApep xApep changed the title Wrong PHP version Wrong PHP version / path Jul 9, 2024
@fritzmg
Copy link
Contributor

fritzmg commented Jul 9, 2024

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

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

@xApep
Copy link
Author

xApep commented Jul 9, 2024

(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

@fritzmg
Copy link
Contributor

fritzmg commented Jul 9, 2024

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.

@xApep
Copy link
Author

xApep commented Jul 9, 2024

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.

@xApep
Copy link
Author

xApep commented Jul 9, 2024

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.

@fritzmg
Copy link
Contributor

fritzmg commented Jul 9, 2024

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.

@xApep
Copy link
Author

xApep commented Jul 9, 2024

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

@fritzmg
Copy link
Contributor

fritzmg commented Jul 10, 2024

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.

@xApep
Copy link
Author

xApep commented Jul 10, 2024

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?

@fritzmg
Copy link
Contributor

fritzmg commented Jul 10, 2024

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

@xApep
Copy link
Author

xApep commented Jul 16, 2024

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

@xApep xApep closed this as completed Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants