Well, one question aside, how do you manage to get functions like MAIL to work properly ?
Regarding your question you could set some kind of variables on a per virtual host bases like:
php_admin_value doc_root "/server/http/htdocs/virtual_hosts/XYZ/"
php_admin_value open_basedir "/server/http/htdocs/virtual_hosts/XYZ/:/server/http/binary/lib/php/"
php_admin_value phpa on