YOu'll need to make some minor tweaks.
Open ubb_lib.cgi in Notepad - inside you'll find references to $ULTIMATEBB, near the top.
One points towards the Perl script, one towards the PHP.
Alter the PHP one to use CGIURL, not NonCGIURL, then copy ultimatebb.php and vars_config.inc.php into the CGI directory.
You'll need to add the #! line to the ultimatebb.php script
It SHOULD work after that, assuming that PHP is sane. <img src="https://www.ubbcentral.com/boards/images/graemlins/wink.gif" alt="" />