Make PHP 5.3 default
At Dreamhost there are two php binaries. ‘php’, which is version 5.2, and ‘php-5.3’ which is 5.3. We need to use 5.3 and Phar/Composer gets confused if the version of the ‘php’ command isn’t actually version 5.3.
$ ln -s /usr/local/bin/php-5.3 ~/bin/php
$ echo "export PATH=~/bin/:\$PATH" >> ~/.bash_profile
$ echo "export PATH=~/bin/:\$PATH" >> ~/.bashrc
Here we make our own little bin directory and creates a symlink to ‘php-5.3’ called ‘php’. We then add this directory to the beginning of the path so this directory is searched first when you try to run ‘php’. So if you log in and out of the shell (to reload the .bash_profile), you should get 5.3 if you run
$ echo "extension = phar.so" >> ~/.php/5.3/phprc
$ echo "suhosin.executor.include.whitelist = phar" >> ~/.php/5.3/phprc
$ php -m | grep Phar
Last step should output “Phar”, if it all worked. If not, try the php.ini-way instead in this guide (which is where I found how to do this in the first place, but found it a bit unclear. Especially the last suhosin stuff).
$ chmod u+x ~/bin/composer.phar
That last step should then give you a bunch of info and no error messages. And Composer should be ready to go