In ubb_setup.cgi.

in &check_cgi_dir

shouldn't it look at the $vars_config{CGIPath} and not $vars_config{VariablesPath}?