The full paths to both the PHP4 and PHP5 executables (and ini files) are shown in the shell script within the wiki article linked above, but I will list them here, in case you wish to copy them manually without using the script;
You will need to copy these files (either PHP4 or PHP5) to a directory within the web accessable directory for your domain. The wiki article suggests creating a 'cgi-bin' directory and copying the files there.
You simply need to add the following lines to the .htaccess file within the root directory for your domain, or create such a .htaccess file if none exists.
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
These lines assume that the PHP executable is within the 'cgi-bin' directory within your domain directory and the executable is called 'php.cgi'
The local PHP install will only affect the domain that you have installed it in, it will not affect any of your other domains (or sub-domains).
Overall, it is probably easier to just follow the step by step instructions in the wiki article.
Edit: The scripts in the wiki article automatically change the 'post_max_size' and 'upload_max_filesize' settings in php.ini after copying the files, but they are easily modified to alter whatever php.ini setting you desire.
Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )