Apache设置特定的PHP二进制文件

I have googled this and found lots of hits which appeared to be the same as I was asking but turned out not to be.

I have 2 different versions of PHP installed, and I would like to specify exactly which php binary apache uses when it starts up.

How could this be done?

Here is an example to indicate version 5.3 should be used and the route to php.ini. Add the following lines to .htaccess:

AddHandler application/x-httpd-php53 .php
SuPHP_ConfigPath /PathTo/DirWithPHP.ini

Personally, I have a machine where php runs as a cgi. I just keep multiple separate installs. Apache looks in /ws/php for the binary

/ws/php
/ws/php5.3
/ws/php5.4
/ws/php5.5

switching versions is a simple folder rename.

There's other ways, but this works and is very simple.