Skip to main content

How to use php-cli 7.X instead 5.6

Comments

3 comments

  • Anoop P Alias
    Issue #1 - Please use full path to php-cli For example : /opt/cpanel/ea-php71/root/usr/bin/php Issue #2 - If you edit from WHM it should work! Note that cPanel (at least for now includes a file /opt/cpanel/ea-php71/root/etc/php.d/local.ini which is an exact replica of the original php.ini and therefore overrides most of the options in php.ini. Editing from WHM edits local.ini instead of php.ini Also note that php-fpm would need a restart if you change any options in php.ini
    0
  • speckados
    Hi. Thanks, I see this on The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation for issue 2. But not need restart php-fpm, for changes apply to cli. Only for apply changes to PHP-FPM For issue 1, I need ENV for PHP use PHP 7.X. I tried some but not work, (with composer) A lot of thanks
    0
  • cPanelMichael
    For issue 1, I need ENV for PHP use PHP 7.X. I tried some but not work, (with composer)

    Hello, The PHP binary finds the version specified for the directory you are currently in (not the directory the file exists in). If you do not run the command from the document root for the domain (where .user.ini and php.ini exist) it will use the system default version. Thank you.
    0

Please sign in to leave a comment.