我已经尝试了在我的mac上升级PHP的所有解决方案,现在按照本教程:http://php-osx.liip.ch/。我还在我的〜/ .profile中编写了导出PATH = / usr / local / php5 / bin:$ PATH。
现在它看起来像这样:
# MacPorts Installer addition on 2012-10-24_at_12:03:59: adding an appropriate PATH variable for use with MacPorts.
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export PATH=/usr/local/php5/bin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
但是当我做“php -v”时,它仍然显示我:
PHP 5.3.15 with Suhosin-Patch (cli) (built: Jul 31 2012 14:49:18)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
什么时候应该说
PHP 5.5.0 (cli) (built: Jun 21 2013 13:11:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0-dev, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.2, Copyright (c) 2002-2013, by Derick Rethans
请帮助,我已经尝试了一切。
答案 0 :(得分:3)
我将其更改为导出PATH =“/ usr / local / php5 / bin:$ PATH”,现在可以正常使用了!