CyberKeeda In Social Media

SOLVED PHP Installed but still php : command not found



I have encountered the problem while upgrading PHP version from 5.3 to 5.4 or 5.5

By default RHEL keeps its stable version of PHP within system, even after upgradation.
This is the reason why it show the default last version even after upgrading.
'

cybeerkeeda@Linux-Maniac:~ php -v
PHP 5.3.3 (cli) (built: Nov 29 2012 14:12:23)
Copyright (c) 1997-2010 The PHP Group



But Wait... we know we have upgraded the version of PHP to 5.4

For some user , while running the same command , it shows command not found

cybeerkeeda@Linux-Maniac:~ php -v
bash: php: command not found


Fix : Fix it permanently by enabling it by sourcing the path.

cybeerkeeda@Linux-Maniac:~ source /opt/rh/php54/enable
Run again the php command to verify
cybeerkeeda@Linux-Maniac:~ php -v

PHP 5.4.14 (cli) (built: May 23 2013 15:42:19)
Copyright (c) 1997-2013 The PHP Group




Hope it gonna work for you too.




No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Designed By Kunal Saha