To use PHP5 on your shared hosting server running both php4 and php5, create a file containing exactly the following contents:
#!/bin/sh
PHP_FCGI_CHILDREN=2
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/php5/bin/php-cgi

Name the file php5.fcgi, place it in your /public_html directory and make it executable (chmod 777). This script tells fastcgi to use the /php/bin/php-cgi program to run php5 files.