Seeing "/cgi-bin/ultimatebb.cgi" tells me that you are at least on UBB-Classic v6. The earlier versions, UBB v2000 to UBB v5.x, were "/cgi-bin/Ultimate.cgi" and "/cgi-bin/ultimate.cgi" respectively.

1) You will first need to upgrade your UBB-Classic 6 to UBB.threads 6.
UBB.threads 6 requires PHP 4 and will not work with PHP 5 or newer. UBB.threads 6 was released at the end of 2003.

2) Then you can directly upgrade your UBB.threads 6 to UBB.threads 7.5.6. I Believe this step also requires PHP 4.
For that procedure, you can follow the directions listed here:

Once you are at UBB.threads 7.5.6, you can then switch to PHP 5.4 - 5.6 and upgrade directly to the most current UBB.threads release version at this time, which is UBB.threads 7.6.2.

If you dont have a Linux box that you can easily change php versions with, this procedure can be done on a Windows box (or VM) using XAMPP. Then exporting your files and database and importing them to your Linux server and modifying your /includes/ file with the correct paths:

XAMPP for Windows 1.6.8 [PHP 4.4.9]
and then
XAMPP for Windows 5.6.38 [PHP 5.6.38]


A word of caution when working with Windows and SQL Databases, is that you need force case sensitive table names.

in C:\xampp\mysql\bin
FIND: [mysqld]
PLACE UNDER IT: lower_case_table_names = 2
So that it looks like this:
# The MySQL server
lower_case_table_names = 2
port= 3306
UBB.threads 7.6.2 supports PHP 5.3 to PHP 5.6
UBB.threads 7.6.2 is the last major version which does not support PHP 7.
UBB.threads 7.7.0 and going forward, will support PHP 5.5+ and PHP 7.

Current developer of UBB.threads PHP Forum Software // 7.7.4 released!
isaac @ // my forum @