Skip to main content

After changing PHP to 8.1 for a domain it still shows as 8.0

Comments

5 comments

  • DennisMidjord
    Running php --version using CLI will always use the version of PHP that's defined as default. What you could do is create a file called "info.php" with the following contents in the website directory: ```
    -1
  • Flyer
    Thanks for your helpful response. I changed the default to 8.1, as I had to run composer update from a CLI, and that solved the problem. The website was already running 8.1, as you said.
    0
  • DennisMidjord
    If you're trying to run a specific PHP version from CLI, you could just use the full path to the PHP executable:
    • /usr/local/bin/ea-php81
    • /usr/local/bin/ea-php80
    • /usr/local/bin/ea-php74
    • ...
    • ...
    0
  • Flyer
    Thanks for the tip. It would be less confusing if cPanel changed this comment on the WHM/MultiPHP Manager page: This setting applies to new account creations and domains set to inherit the System PHP Version. to something like this: This setting applies to new account creations and domains set to inherit the System PHP Version, and to all CLI shells.
    0
  • cPRex Jurassic Moderator
    @Flyer - that's a good idea. I created an improvement case with our developers to see if they can update that wording!
    0

Please sign in to leave a comment.