Skip to main content

Cannot get PHP 7.2 in shell

Comments

10 comments

  • sparek-3
    Try /opt/cpanel/ea-php72/root/usr/bin/php -v although, I suspect that something else is going on, that may need to be addressed some where.
    0
  • cPanelLauren
    Hi @SoftDux What displays for the PHP version when you look use a phpinfo page?
    0
  • SoftDux
    Try /opt/cpanel/ea-php72/root/usr/bin/php -v although, I suspect that something else is going on, that may need to be addressed some where.

    as root it gives the correct PHP version: [QUOTE] root@zzz:[~]$ /opt/cpanel/ea-php72/root/usr/bin/php -v PHP 7.2.14 (cli) (built: Feb 10 2019 18:20:08) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24. com (unconfigured) v10.2.4, Copyright (c) 2002-2018, by ionCube Ltd.
    But as the user not: [QUOTE] root@zzz:[~]$ su - xxx Last login: Wed Mar 6 21:37:10 SAST 2019 on pts/0 09:04:21 up 1 day, 12:22, 0 users, load average: 0.68, 1.06, 0.98 xxx@zzz:[~]$ /opt/cpanel/ea-php72/root/usr/bin/php -v PHP 7.0.33 (cli) (built: Feb 10 2019 12:54:41) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24. com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd. with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies with SourceGuardian v11.2, Copyright (c) 2000-2018, by SourceGuardian Ltd.
    0
  • sparek-3
    What does ls -al /opt/cpanel/ea-php72/root/usr/bin/php /usr/local/bin/ea-php72 show?
    0
  • SoftDux
    What does ls -al /opt/cpanel/ea-php72/root/usr/bin/php /usr/local/bin/ea-php72 show?

    as root: [QUOTE] root@zzz:[~]$ ls -al /opt/cpanel/ea-php72/root/usr/bin/php /usr/local/bin/ea-php72 -rwxr-xr-x 1 root root 4822256 Feb 11 01:23 /opt/cpanel/ea-php72/root/usr/bin/php lrwxrwxrwx 1 root root 37 Feb 19 22:06 /usr/local/bin/ea-php72 -> /opt/cpanel/ea-php72/root/usr/bin/php
    as user: [QUOTE] root@zzz:[~]$ su - xxx Last login: Thu Mar 7 09:04:21 SAST 2019 on pts/0 13:42:07 up 2 days, 16:59, 0 users, load average: 0.77, 0.96, 1.00 xxx@zzz:[~]$ xxx@zzz:[~]$ ls -al /opt/cpanel/ea-php72/root/usr/bin/php /usr/local/bin/ea-php72 lrwxrwxrwx 1 root root 27 Mar 8 12:24 /opt/cpanel/ea-php72/root/usr/bin/php -> /etc/cl.selector/ea-php-cli lrwxrwxrwx 1 root root 37 Feb 12 2018 /usr/local/bin/ea-php72 -> /opt/cpanel/ea-php72/root/usr/bin/php
    0
  • sparek-3
    You're mixing and matching EasyApache PHP and CloudLinux PHP. The PHP version you are seeing in the user's shell is controlled by CloudLinux's voodoo with their CageFS.
    0
  • cPanelMichael
    Hello @SoftDux, The system uses the user's configured PHP path to determine which PHP version it calls. Can you let us know the output from the command below when you run the PHP version check as the user? pwd
    If it doesn't show /home/$username/public_html, browse to the user's public_html directory and see if the issue persists. EX: cd /home/$username/public_html php -v
    If you're using CloudLinux, can you share more information about how you've defined the default PHP version and the account's PHP version? Thank you.
    0
  • SoftDux
    Hello @SoftDux, The system uses the user's configured PHP path to determine which PHP version it calls. Can you let us know the output from the command below when you run the PHP version check as the user? pwd

    Hi Michael, I am in the user's home folder, as the user: xxx@zzz:[~]$ pwd /home/xxx xxx@zzz:[~]$ php -v ea-php-cli Copyright 2017 cPanel, Inc. PHP 7.0.33 (cli) (built: Feb 10 2019 12:54:41) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd. with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies with SourceGuardian v11.2, Copyright (c) 2000-2018, by SourceGuardian Ltd.
    If it doesn't show /home/$username/public_html, browse to the user's public_html directory and see if the issue persists. EX: cd /home/$username/public_html php -v

    The cron script isn't in the public_html folder, but the PHP version is same: xxx@zzz:[~]$ cd public_html/ xxx@zzz:[public_html]$ php -v ea-php-cli Copyright 2017 cPanel, Inc. PHP 7.0.33 (cli) (built: Feb 10 2019 12:54:41) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.3.2, Copyright (c) 2002-2018, by ionCube Ltd. with Zend OPcache v7.0.33, Copyright (c) 1999-2017, by Zend Technologies with SourceGuardian v11.2, Copyright (c) 2000-2018, by SourceGuardian Ltd. xxx@zzz:[public_html]$ whoami xxx
    If you're using CloudLinux, can you share more information about how you've defined the default PHP version and the account's PHP version? Thank you.

    I am not sure what info you're looking for. CloudLinux is installed but I don't see an option in WHM to give users a different PHP version than what they would select in cPanel.
    0
  • cPanelMichael
    Hello @SoftDux, Can you open a
    0

Please sign in to leave a comment.