What version of PHP are you running? You might try making a small php script with the following and put it into your ubbthreads directory and see if it prints anything out:
<?
require ("main.inc.php");
$What = find_environmental ("PHP_SELF");
echo $What;
?>
-------------------
Rick Baker
UBBThreads developer