Skip to main content

Update cli php to 8.1

Comments

4 comments

  • vanessa
    I'm not entirely sure, but try changing the main version in MultiPHP manager in WHM and see if that does it? Otherwise you have a few options: 1) uninstall the old cli version and reinstall the the php package for the version you want 2) symlink /usr/local/bin/php to the version you want 3) (best option) don't rely on the /usr/[local]/bin version at all, and instead call cli from the correct location, ie: [root@server ~]# /opt/cpanel/ea-php81/root/bin/php -v PHP 8.1.19 (cli) (built: May 17 2023 20:21:55) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.19, Copyright (c) Zend Technologies
    0
  • TechBill
    I'm not entirely sure, but try changing the main version in MultiPHP manager in WHM and see if that does it? Otherwise you have a few options: 1) uninstall the old cli version and reinstall the the php package for the version you want 2) symlink /usr/local/bin/php to the version you want 3) (best option) don't rely on the /usr/[local]/bin version at all, and instead call cli from the correct location, ie: [root@server ~]# /opt/cpanel/ea-php81/root/bin/php -v PHP 8.1.19 (cli) (built: May 17 2023 20:21:55) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.19, Copyright (c) Zend Technologies

    Our issue is the composer is calling the php using the default php cli and there doesn't seem to be a way to force it to call the /opt/cpanel/ea-php81/root/bin/php # php -v PHP 8.0.28 (cli) (built: Jun 6 2023 17:45:40) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.28, Copyright (c) Zend Technologies with Zend OPcache v8.0.28, Copyright (c), by Zend Technologies We could uninstall 8.0 but it would fall back to 7.4 and we cannot uninstall 7.4 due to one of our application compatibly. What would happen if we uninstall the cli extension in 7.4? Would it causes it to default to the 8.1 cli?
    0
  • quietFinn
    What is the default PHP version (in WHM->Software-> MultiPHP Manager)?
    0
  • TechBill
    What is the default PHP version (in WHM->Software-> MultiPHP Manager)?

    AH! that what changes the default php cli .... Many thanks! php -v PHP 8.1.19 (cli) (built: Jun 6 2023 17:46:08) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.19, Copyright (c) Zend Technologies with Zend OPcache v8.1.19, Copyright (c), by Zend Technologie
    0

Please sign in to leave a comment.