Edit: just seen your updated while was posting, left below in case helps!
ah right sorry, below is from SMF log after TP 2.2.2 install fails, there looks to be log entry for each loop, the first is:
10.10.11.27
896535194166c9d5d81748d5380bebed
https://wealdencaving.org.uk/forum2/smf/index.php?action=admin;area=packages;sa=install2;package=TinyPortal-2.2.2-1-test2b.zip;pid=0 /home/wealdencaving.org.uk/public_html/forum2/smf/Packages/temp/install.php (Line 354) Backtrace information
#0: smf_db_error()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/Subs-Db-mysql.php on line 495
#1: smf_db_query()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/DbPackages-mysql.php on line 476
#2: smf_db_change_column()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/DbPackages-mysql.php on line 346
#3: smf_db_add_column()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Packages/temp/install.php on line 354
#4: require()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/Packages.php on line 1064
#5: PackageInstall()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/Subs.php on line 6016
#6: call_helper()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/Packages.php on line 91
#7: Packages()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/Sources/Admin.php on line 499
#8: AdminMain()
Called from /home/wealdencaving.org.uk/public_html/forum2/smf/index.php on line 191