How to use php-cli 7.X instead 5.6
Hi.
I need use for Laravel and Symfony projects, use php-cli or php on command line but version 7 or 7.1
Site has 7.0 with FPM and not problem. But on command line we need also use php 7.X
It's possible? Also, i don't understand the strange behavior of php.ini. Well, on shell
Edit /opt/cpanel/ea-php56/root/etc/php.ini for put allow_url_fopen = On But after run info for get value of allow_url_open value is still off Try edit also on WHM, but not work.
[excelle@srv105 ~]$ php -v
ea-php-cli Copyright 2016 cPanel, Inc.
PHP 5.6.30 (cli) (built: May 17 2017 20:27:43)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.1, Copyright (c) 2002-2016, by ionCube Ltd.
with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend TechnologiesIt's possible? Also, i don't understand the strange behavior of php.ini. Well, on shell
php --info | grep allow_url_fopen
allow_url_fopen => Off => Off
[excelle@srv105 ~]$ php --info | grep php.ini
Configuration File (php.ini) Path => /opt/cpanel/ea-php56/root/etc
Loaded Configuration File => /opt/cpanel/ea-php56/root/etc/php.iniEdit /opt/cpanel/ea-php56/root/etc/php.ini for put allow_url_fopen = On But after run info for get value of allow_url_open value is still off Try edit also on WHM, but not work.
-
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 -
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 -
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.
Comments
3 comments