Make sure you uploaded the files in ASCII and set the correct permissions. Also, check to make sure the path to perl is correct in the ultimatebb.cgi and cp.cgi files.

It would also help to know what version of UBB6 you're installing and a link to your cp.cgi.