V
V
VMesser2018-07-26 00:56:38
PHP
VMesser, 2018-07-26 00:56:38

Why does Composer see the wrong version of PHP?

I'm trying to install dependencies, I get the following message:

# composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for cache/simple-cache-bridge ^1.0 -> satisfiable by cache/si mple-cache-bridge[1.0.0].
    - cache/simple-cache-bridge 1.0.0 requires php ^5.6 || ^7.0 -> your PHP version (5.3 .3) does not satisfy that requirement.
  Problem 2
    - Installation request for cache/apcu-adapter ^1.0 -> satisfiable by cache/apcu-adap ter[1.0.0].
    - cache/apcu-adapter 1.0.0 requires php ^5.6 || ^7.0 -> your PHP version (5.3.3) doe s not satisfy that requirement.
  Problem 3
    - phpoffice/phpspreadsheet 1.3.1 requires php ^5.6|^7.0 -> your PHP version (5.3.3)  does not satisfy that requirement.
    - phpoffice/phpspreadsheet 1.3.0 requires php ^5.6|^7.0 -> your PHP version (5.3.3)

Wherein:
# php -v
PHP 5.6.33 (cli) (built: Jan 19 2018 11:32:55)
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) v10.0.4, Copyright (c) 2002-2017, 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 Technologies

That is, php -v shows 5.6.33, and Composer thinks that 5.3.3
Googling, I realized that php -v shows the version that I registered in the alias of the php command, that is, it is like a crutch. And somewhere in the bowels of the OS or the server there is a direct indication of the use of 5.3.3. How to fix all this beautifully?
By the way php -r "echo phpinfo();" , it also gives 5.6.33

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2018-07-26
@VMesser

Add the path to the new puff to the top of $PATH.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question