AddHandler cgi-script .php
# 6-27-2005 config to run PHP as CGI
<Files ~ "\.(phpcgi)$">
Here's what I've done. The first section causes any *.php files in the "kerb" folder only to be run as CGI instead of mod-php. The second section causes any *.phpcgi files anywhere in the web site to run as CGI - you can easily change to *.php5 or whatever.
For CGI, the script is run by whatever program is specified in the first "shebang" line at the top of the script - you can specify the patch to either the PHP4 CGI executable or the PHP5 per script.
Also, Apache supposedly has a way where if you put the PHP executable in the web root or in /cgi-bin or wherever - you can run the script as PHP4 or PHP5 per Apache config rather than needing the shebang line and remembering to chmod each script executable. This might even be more of what you want to do, but their are security concerns with doing it this way if PHP hasn't been configured for it.