Skip to main content

EA3 compile with php-cli

Comments

8 comments

  • cPanelMichael
    Hello, You can run the following commands with EasyApache 3 to see what path to use for PHP-CLI:
    /usr/bin/php -v /usr/local/bin/php -v
    Look for "CLI" in the output to see which one to use (it depends on if CGI/suPHP are enabled in your EasyApach 3 build profile). Thank you.
    0
  • jimlongo
    Thanks Michael. I'm still not clear on what to do to enable cli. phpinfo() indicates that I'm using Server API CGI/FastCGI my current build configuration is Default PHP Version (.php files) 5 PHP 5 Handler suphp Apache suEXEC on Apache Ruid2 off root@vps [~]# /usr/bin/php -v PHP 5.6.30 (cgi-fcgi) (built: Jun 6 2017 23:44:27) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with XCache v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo root@vps [~]# /usr/local/bin/php -v PHP 5.6.30 (cli) (built: Jun 6 2017 23:44:21) Copyright (c) 1997-2016 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies with XCache v3.2.0, Copyright (c) 2005-2014, by mOo with XCache Cacher v3.2.0, Copyright (c) 2005-2014, by mOo
    0
  • cPanelMichael
    Hello, Could you provide some more information about how you are attempting to utilize it? Based on the output, you'd use the following path if you wanted to invoke PHP-CLI via the command line or a cron job:
    /usr/local/bin/php
    The PHPINFO file is not going to show PHP-CLI because you are not invoking it from the command line. Thank you.
    0
  • jimlongo
    Thanks, I got you now.
    0
  • jimlongo
    Now, how can I compile php-cli with "readline" support? So that I get a php> prompt and can output each command? When I enter php -a I get "Interactive Mode Enabled" I would prefer to have an Interactive Shell which is not the same as I understand it. Documentation says to compile php with --with-readline option.
    0
  • cPanelMichael
    When I enter php -a I get "Interactive Mode Enabled"

    You'd need to use the full path. EX:
    /usr/local/bin/php -a
    You should be able to install "readline" as a PHP module in your EasyApache 3 build profile if it's not enabled by default:
    /usr/local/bin/php -m|grep readline readline
    Thank you.
    0
  • jimlongo
    You should be able to install "readline" as a PHP module in your EasyApache 3 build profile if it's not enabled by default:
    This is where I'm at, there is no option to enable "readline" in EA3 build profile that I can see. Is it called something else? root@vps [~]# /usr/local/bin/php -m|grep readline root@vps [~]#
    0
  • cPanelMichael
    Are you sure it's not installed by default? Check to see if the module name is output when running the "/usr/local/bin/php -m|grep readline" command. Also, did you try running "/usr/local/bin/php -a" to see if the issue persists when using the full path? Thank you.
    0

Please sign in to leave a comment.