Php -v shows cgi-fcgi

I was following the installation instructions to clone the repository and then all of a sudden I started getting the error "bin / magento must be running as a CLI application".

When I did php -v it shows:

ea-php-cli Copyright 2016 cPanel, Inc.
PHP 7.0.17 (cgi-fcgi) (built: Apr  5 2017 23:22:19)
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.17, Copyright (c) 1999-2017, by Zend Technologies

      

I have sincerely looked for hours to change this to show (cli) but no luck so far.

I reinstalled ea-php-cli via yum but nothing changed.

When I stopped and restarted httpd, I get a bunch of errors like this:

[alias: warn] [pid 31484] AH00671: The ScriptAlias ​​directive in / etc / apache 2 / conf / httpd.conf on line 645 will probably never match because it overrides previous ScriptAlias.

Does anyone know a command to change php mode in cli mode and not in cgi-fcgi mode? If not, do I need to uninstall and reinstall php?

Update

so after some research I realized that it is related to the server API where it is configured as FPM / FAstCGI and not Apache 2.0 Handler. I will need to research this and then learn how to switch the server API back to Apache Handler ... I am running Centos 6.9, so if anyone has a simple solution, I would really appreciate your input.

Read more Update

The only thing I can think of may have influenced the server API to switch is a few fixes I made. Here's a list of all the fixes and changes made to the server today:

Apr 15 12:47:02 Installed: kernel-2.6.32-696.1.1.el6.x86_64
Apr 15 13:14:02 Installed: 1:perl-Error-0.17015-4.el6.noarch
Apr 15 13:14:02 Installed: perl-Git-1.7.1-8.el6.noarch
Apr 15 13:14:03 Installed: git-1.7.1-8.el6.x86_64
Apr 15 19:21:49 Erased: epel-release
Apr 15 20:33:45 Installed: ea-php-cli-0.2.0-1.1.1.cpanel.x86_64
Apr 15 21:00:58 Installed: ea-php-cli-0.2.0-1.1.1.cpanel.x86_64
Apr 15 22:32:44 Installed: ea-php-cli-0.2.0-1.1.1.cpanel.x86_64

      

+3


source to share


1 answer


After 15 hours of searching for an answer, I finally figured it out.

Just add source / opt / cpanel / ea-php70 / enable to / etc / bashrc and php -v causes the cli to be shown.



PHP 7.0.17 (cli) (built: 5 Apr 2017 11:21:59 pm) (NTS) Copyright (c) 1997-2017 PHP Zend Engine v3.0.0 Team, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.17, Copyright (c) 1999-2017, Zend Technologies

0


source







All Articles