(gs):Set specific PHP version for command line
- This page was last modified on November 22, 2010, at 10:58.
From (mt) Community Wiki
Currently, PHP 4.4.8 is the bash client version used for SSH on the (gs) Grid-Service. This is defined by the environment variable for your particular (gs) Grid-Service Cluster.
-
To select the latest stable PHP 5 client version instead, just add the following line to your .bash_profile:
.bash_profile
export PATH=/usr/local/php5/bin:$PATH
- You can also use the echo command to enter it in the .bash_profile automatically:
echo export 'PATH=/usr/local/php5/bin:$PATH' >> ~/.bash_profile
- Then, reload your bash configuration:
source .bash_profile
- Once this is done, run the following command to view the new version:
php -v
PHP 5.2.5 (cli) (built: Jan 18 2008 12:24:25) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies with Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies