如何在linux上设置正确的php版本[关闭]

Our system currently has multiple versions of php installed. the apache server is configured to use the latested version(5.3). but when i log in, i still get the older version php. how can i configure my own environment to use the right version php?

Thanks,

You can:

  1. Modify the PATH so that includes the correct PHP-directory. See this.
  2. Set up an alias for the new PHP version. See this.
alias php53="/path/to/php5.3/bin/php"

This is likely more for superuser.com, but you can modify .bash_rc and alias PHP to <whatever your path is for PHP>