Skip to main content
1 of 2
bgld
  • 43
  • 1
  • 5

PHP CLI and Bash - change behaviour of PHP keyword

Our hosting providers have installed 3 versions of PHP onto our linux box and when I SSH into it the command php points to use/bin/php which is version 5.2, the command php-5.4 points to usr/bin/php-5.4 which is version 5.4 of course.

This isn't a problem when I just need to run a single script that needs a newer version of php, I can just specify php-5.4, however when I try to run the Laravel installer or try to install Laravel using Composer it is throwing errors that are caused by php 5.2 being used.

Is there a way to change where the php keyword points? Or do I need to remove bin/php and rename bin/php-5.4?

Cheers!

bgld
  • 43
  • 1
  • 5