Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/293.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在OSX上升级到PHP5.6_Php_Macos - Fatal编程技术网

在OSX上升级到PHP5.6

在OSX上升级到PHP5.6,php,macos,Php,Macos,我正在尝试运行一个命令: sudo php bin/magento indexer:reindex 输出: Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements PHP 5.5.24 (cli) (built: May 19 2015 10:10:05) Copyright

我正在尝试运行一个命令:

 sudo php bin/magento indexer:reindex
输出:

Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements
PHP 5.5.24 (cli) (built: May 19 2015 10:10:05) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
然后我做了:

curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
这似乎奏效了

所以我再次尝试运行该命令

同样的错误

然后我做了php-v

输出:

Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements
PHP 5.5.24 (cli) (built: May 19 2015 10:10:05) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
然后,我尝试使用以下方法再次安装:

旋度-s | bash-s 5.6\

输出:

已安装


像这样安装php之后,我使用osx yosemite

curl-shttp://php-osx.liip.ch/install.sh |bash-s5.6
我必须运行
导出路径=/usr/local/php5/bin:$PATH然后它工作了

检查它是否安装在/usr/local/bin中。可能是您的/usr/bin在路径中位于您的本地bin之前。在usr/local中有两个版本,旧版本和新版本@M.Alnashmi如何从这里继续?在终端中,导出路径=/usr/local/bin:/usr/bin,然后执行:哪个php。现在执行了@M.Alnashmi/usr/bin/php运行了哪个php之后执行了@M.Alnashmi/bin/php