Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
Blank page after logging in
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / v3 Support

2025-12-22 19:47:41
I am running php 8.4 and code from https://github.com/ExYuSubs/TT-v3.8.3
I get a blank page, after logging in.
this is my error log:

2025/12/22 20:39:57 [error] 1046#1046: *4087 FastCGI sent in stderr: "PHP message: SQL Query Execution Error: Table 'tt_v_3_8_3_db.warnings' doesn't exist; PHP message: PHP Fatal error:  Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /var/www/TT-v3.8.3/backend/cleanup.php:157
Stack trace:
#0 /var/www/TT-v3.8.3/backend/cleanup.php(157): mysqli_fetch_assoc()
#1 /var/www/TT-v3.8.3/backend/functions.php(174): do_cleanup()
#2 /var/www/TT-v3.8.3/backend/functions.php(151): autoclean()
#3 /var/www/TT-v3.8.3/index.php(7): dbconn()
#4 {main}
 thrown in /var/www/TT-v3.8.3/backend/cleanup.php on line 157" while reading response header from upstream, client: 192.168.1.1, server: umunu.ru, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.4-fpm.sock:", host: "umunu.ru"
2025/12/22 20:40:06 [error] 1047#1047: *4095 FastCGI sent in stderr: "PHP message: PHP Notice:  Only variables should be passed by reference in /var/www/TT-v3.8.3/backend/functions.php on line 343" while reading response header from upstream, client: 192.168.1.1, server: umunu.ru, request: "POST /account-login.php HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.4-fpm.sock:", host: "umunu.ru", referrer: "https://umunu.ru/account-login.php?returnto=%2F"
2025/12/22 20:40:06 [error] 1047#1047: *4095 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.1, server: umunu.ru, request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.4-fpm.sock:", host: "umunu.ru", referrer: "https://umunu.ru/"
Last edited by josephblauman on 2025-12-22 19:53:29
2025-12-22 20:33:02
I got rid of one of the errors, cleanup.php:

//check if warning system is on
// REMOVE WARNINGS
$res = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM us>
if ($res) {
       while ($arr1 = mysqli_fetch_assoc($res)){
               SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $arr1>
               SQL_Query_exec("UPDATE warnings SET active = 'no' WHERE userid >
               write_log("Removed warning for $arr1[username]. Expiry: $arr1[e>
       }
}
// WARN USERS THAT STILL HAVE ACTIVE WARNINGS
SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE warned = 'no' AND id IN (>
//END//
2025-12-22 21:40:07
Testing...replace with :
--------------
// REMOVE WARNINGS
$res = SQL_Query_exec("
   SELECT users.id, users.username, warnings.expiry
   FROM users
   LEFT JOIN warnings ON warnings.userid = users.id
   WHERE warnings.active = 'yes'
     AND warnings.expiry < NOW()
");

if ($res !== false) {
   while ($arr1 = mysqli_fetch_assoc($res)) {

       $userid   = (int)$arr1['id'];
       $username = $arr1['username'] ?? '';
       $expiry   = $arr1['expiry'] ?? 'unknown';

       SQL_Query_exec("
           UPDATE users
           SET warned = 'no'
           WHERE id = $userid
       ");

       SQL_Query_exec("
           UPDATE warnings
           SET active = 'no'
           WHERE userid = $userid
       ");

       write_log("Removed warning for {$username}. Expiry: {$expiry}");
   }
}

// WARN USERS THAT STILL HAVE ACTIVE WARNINGS
SQL_Query_exec("
   UPDATE users
   SET warned = 'yes'
   WHERE warned = 'no'
     AND id IN (
         SELECT userid
         FROM warnings
         WHERE active = 'yes'
     )
");

// END

Last edited by spiritblue on 2025-12-22 21:40:25
2025-12-22 22:32:54
CREATE TABLE `warnings` (
 `id` int(10) NOT NULL AUTO_INCREMENT,
 `userid` int(10) NOT NULL DEFAULT '0',
 `reason` varchar(255) NOT NULL DEFAULT '',
 `added` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `expiry` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
 `warnedby` int(10) NOT NULL DEFAULT '0',
 `type` varchar(30) NOT NULL DEFAULT '',
 `active` enum('yes','no') DEFAULT 'yes',
 PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;



// ADD WARNING
$res = SQL_Query_exec("SELECT id,username FROM users WHERE class = 1 AND warned = 'no' AND enabled='yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");

if ($res && mysqli_num_rows($res) > 0){
   $timenow = get_date_time();
   $reason = "You have been warned because of having low ratio. You need to get a ".$minratio." before next ".$length." days or your account may be banned.";
   $expiretime = gmdate("Y-m-d H:i:s", gmtime() + (86400 * $length));

   while ($arr = mysqli_fetch_assoc($res)){
       SQL_Query_exec("INSERT INTO warnings (userid, reason, added, expiry, warnedby, type) VALUES ('".$arr["id"]."','".$reason."','".$timenow."','".$expiretime."','0','Poor Ratio')");
       SQL_Query_exec("UPDATE users SET warned='yes' WHERE id='".$arr["id"]."'");
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr["id"]."', '".$timenow."', '".$reason."', '0')");
       write_log("Auto Leech warning has been <b>added</b> for: <a href='account-details.php?id=".$arr["id"]."'>".$arr["username"]."</a>");
   }
}

// REMOVE WARNING
$res1 = SQL_Query_exec("SELECT users.id, users.username FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND warned = 'yes'  AND enabled='yes' AND uploaded / downloaded >= $minratio AND downloaded >= $downloaded");

if ($res1 && mysqli_num_rows($res1) > 0){
   $timenow = get_date_time();
   $reason = "Your warning of low ratio has been removed. We highly recommend you to keep a your ratio up to not be warned again.\n";

   while ($arr1 = mysqli_fetch_assoc($res1)){
       write_log("Auto Leech warning has been removed for: <a href='account-details.php?id=".$arr1["id"]."'>".$arr1["username"]."</a>");
       SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = '".$arr1["id"]."'");
       SQL_Query_exec("UPDATE warnings SET expiry = '$timenow', active = 'no' WHERE userid = $arr1[id]");
       SQL_Query_exec("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES ('0', '".$arr1["id"]."', '".$timenow."', '".$reason."', '0')");
   }
}

// BAN WARNED USERS
$res = SQL_Query_exec("SELECT users.id, users.username, UNIX_TIMESTAMP(warnings.expiry) AS expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type='Poor Ratio' AND active = 'yes' AND class = 1 AND enabled='yes' AND warned = 'yes' AND uploaded / downloaded < $minratio AND downloaded >= $downloaded");

if ($res && mysqli_num_rows($res) > 0){
   $timenow = get_date_time();
   while ($arr = mysqli_fetch_assoc($res)){
       if (gmtime() - $arr["expiry"] >= 0) {
           SQL_Query_exec("UPDATE users SET enabled='no', warned='no' WHERE id='".$arr["id"]."'");
           write_log("User <a href='account-details.php?id=".$arr["id"]."'>".$arr["username"]."</a> has been banned (Auto Leech warning).");
       }
   }
}

// REMOVE OTHER WARNINGS
$res = SQL_Query_exec("SELECT users.id, users.username, warnings.expiry FROM users INNER JOIN warnings ON users.id=warnings.userid WHERE type != 'Poor Ratio' AND warned = 'yes'  AND enabled='yes' AND warnings.active = 'yes' AND warnings.expiry < '".get_date_time()."'");

if ($res) {
   while ($arr1 = mysqli_fetch_assoc($res)){
       SQL_Query_exec("UPDATE users SET warned = 'no' WHERE id = $arr1[id]");
       SQL_Query_exec("UPDATE warnings SET active = 'no' WHERE userid = $arr1[id] AND expiry < '".get_date_time()."'");
       write_log("Removed warning for $arr1[username]. Expiry: $arr1[expiry]");
   }
}

// WARN USERS THAT STILL HAVE ACTIVE WARNINGS
SQL_Query_exec("UPDATE users SET warned = 'yes' WHERE warned = 'no' AND id IN (SELECT userid FROM warnings WHERE active = 'yes')");

Last edited by coco on 2025-12-22 22:44:30
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728