Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
Reply
  #1  
Old 14th July 2013, 22:37
Dote Dote is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 17
Default problem with my tracker system
Hi, i have problems with my TBDev system.
when people downloading to there seedbox/computer or trying to upload some torrents there are errors like:
"invaild hash_pass"
"invaild peer_id"
"finding peers"
and some more..
the torrents are also red and not seeding.
but its happened just in my tracker while every tracker else is good.

someone can help me please?

I'm using TBDev 2009 (final) rev 295
Reply With Quote
  #2  
Old 14th July 2013, 23:17
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
First check if magic quota's have been disabled in your php config file
(php.ini), this could be the reason why you are getting announce errors. Also, it might be a good idea to download http://forum.u-232.com/index.php?action=downloads and try it! if you aren't or ready. I have installed it on my Linux dedi server and it works perfectly.
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me


Last edited by firefly007; 16th July 2013 at 03:23.
Reply With Quote
  #3  
Old 15th July 2013, 08:35
x360zone's Avatar
x360zone x360zone is offline
Senior Member
 
Join Date: Jul 2011
United Kingdom
Posts: 915
Default hi
is this local host or shared hosting?
__________________

7.5 tsse
future tracker source & hosting, vps
trackers installs + Themes
http://www.foxyhosting.co.uk
http://www.downmy.top testing zone
offshore vps & cpanel hosting & Shoutcast & VPN
STOP cyberbullying
any setups tracker installs vps hosting vps setups themes mods hit me up
over the last three months ive become a snake breeder,pythons,hogs,boa,corn,rat,king,carpet and what joy it is


Reply With Quote
  #4  
Old 15th July 2013, 11:01
Dote Dote is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 17
Default
Quote:
Originally Posted by firefly007 View Post
First check if magic quota's have been disabled in your php config file
(php.ini), this could be the reason why you are reason announce errors. Also, it might be a good idea to download http://forum.u-232.com/index.php?action=downloads and try it! if you aren't or ready. I have installed it on my Linux dedi server and it works perfectly.
i talk with the owner of the hosting and he said to me "No, its not a privet server".

Quote:
Originally Posted by x360zone View Post
is this local host or shared hosting?
shared hosting

Last edited by Dote; 15th July 2013 at 11:32.
Reply With Quote
  #5  
Old 15th July 2013, 11:50
x360zone's Avatar
x360zone x360zone is offline
Senior Member
 
Join Date: Jul 2011
United Kingdom
Posts: 915
Default hi
good luck there it probably wont work go vps or test another host
__________________

7.5 tsse
future tracker source & hosting, vps
trackers installs + Themes
http://www.foxyhosting.co.uk
http://www.downmy.top testing zone
offshore vps & cpanel hosting & Shoutcast & VPN
STOP cyberbullying
any setups tracker installs vps hosting vps setups themes mods hit me up
over the last three months ive become a snake breeder,pythons,hogs,boa,corn,rat,king,carpet and what joy it is


Reply With Quote
  #6  
Old 15th July 2013, 21:15
Dote Dote is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 17
Default
I disabled magic quote's and it worked but now when i'm uploading torrent after a while it deleting all the torrent until torrent number 128 everytime!
is so weird and i cant find out the problem.
Reply With Quote
  #7  
Old 15th July 2013, 22:13
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Quote:
Originally Posted by Dote View Post
I disabled magic quote's and it worked but now when i'm uploading torrent after a while it deleting all the torrent until torrent number 128 everytime!
is so weird and i cant find out the problem.
Backup cleanup.php in /include/ and replace with this

PHP Code:
<?php
/*
+------------------------------------------------
|   TBDev.net BitTorrent Tracker PHP
|   =============================================
|   by CoLdFuSiOn
|   (c) 2003 - 2009 TBDev.Net
|   http://www.tbdev.net
|   =============================================
|   svn: http://sourceforge.net/projects/tbdevnet/
|   Licence Info: GPL
+------------------------------------------------
|   $Date$
|   $Revision$
|   $Author$
|   $URL$
+------------------------------------------------
*/
require_once("bittorrent.php");

function 
deadtime() {
    global 
$TBDEV;
    return 
time() - floor($TBDEV['announce_interval'] * 1.3);
}

function 
docleanup() {
    global 
$TBDEV;

    
set_time_limit(0);
    
ignore_user_abort(1);

    do {
        
$res mysql_query("SELECT id FROM torrents");
        
$ar = array();
        while (
$row mysql_fetch_array($res,MYSQL_NUM)) {
            
$id $row[0];
            
$ar[$id] = 1;
        }

        if (!
count($ar))
            break;

        
$dp = @opendir($TBDEV['torrent_dir']);
        if (!
$dp)
            break;

        
$ar2 = array();
        while ((
$file readdir($dp)) !== false) {
            if (!
preg_match('/^(\d+)\.torrent$/'$file$m))
                continue;
            
$id $m[1];
            
$ar2[$id] = 1;
            if (isset(
$ar[$id]) && $ar[$id])
                continue;
            
$ff $TBDEV['torrent_dir'] . "/$file";
            
unlink($ff);
        }
        
closedir($dp);

        if (!
count($ar2))
            break;

        
$delids = array();
        foreach (
array_keys($ar) as $k) {
            if (isset(
$ar2[$k]) && $ar2[$k])
                continue;
            
$delids[] = $k;
            unset(
$ar[$k]);
        }
        if (
count($delids))
            
mysql_query("DELETE FROM torrents WHERE id IN (" join(","$delids) . ")");

        
$res mysql_query("SELECT torrent FROM peers GROUP BY torrent");
        
$delids = array();
        while (
$row mysql_fetch_array($res,MYSQL_NUM)) {
            
$id $row[0];
            if (isset(
$ar[$id]) && $ar[$id])
                continue;
            
$delids[] = $id;
        }
        if (
count($delids))
            
mysql_query("DELETE FROM peers WHERE torrent IN (" join(","$delids) . ")");

        
$res mysql_query("SELECT torrent FROM files GROUP BY torrent");
        
$delids = array();
        while (
$row mysql_fetch_array($res,MYSQL_NUM)) {
            
$id $row[0];
            if (isset(
$ar[$id]) && $ar[$id])
                continue;
            
$delids[] = $id;
        }
        if (
count($delids))
            
mysql_query("DELETE FROM files WHERE torrent IN (" join(","$delids) . ")");
    } while (
0);

    
$deadtime deadtime();
    @
mysql_query("DELETE FROM peers WHERE last_action < $deadtime");

    
$deadtime -= $TBDEV['max_dead_torrent_time'];
    @
mysql_query("UPDATE torrents SET visible='no' WHERE visible='yes' AND last_action < $deadtime");

    
$deadtime time() - $TBDEV['signup_timeout'];
    @
mysql_query("DELETE FROM users WHERE status = 'pending' AND added < $deadtime AND last_login < $deadtime AND last_access < $deadtime");

    
$torrents = array();
    
$res = @mysql_query("SELECT torrent, seeder, COUNT(*) AS c FROM peers GROUP BY torrent, seeder");
    while (
$row mysql_fetch_assoc($res)) {
        if (
$row["seeder"] == "yes")
            
$key "seeders";
        else
            
$key "leechers";
        
$torrents[$row["torrent"]][$key] = $row["c"];
    }

    
$res = @mysql_query("SELECT torrent, COUNT(*) AS c FROM comments GROUP BY torrent");
    while (
$row mysql_fetch_assoc($res)) {
        
$torrents[$row["torrent"]]["comments"] = $row["c"];
    }
    
    
    
$fields explode(":""comments:leechers:seeders");
    
$res = @mysql_query("SELECT id, seeders, leechers, comments FROM torrents");
    while (
$row mysql_fetch_assoc($res)) {
        
$id $row["id"];
        if(isset(
$torrents[$id]))
        
$torr $torrents[$id];
        foreach (
$fields as $field) {
            if (!isset(
$torr[$field]))
                
$torr[$field] = 0;
        }
        
$update = array();
        foreach (
$fields as $field) {
            if (
$torr[$field] != $row[$field])
                
$update[] = "$field = " $torr[$field];
        }
        if (
count($update))
            @
mysql_query("UPDATE torrents SET " implode(","$update) . " WHERE id = $id");
    }

    
//delete inactive user accounts
    
$secs 42*86400;
    
$dt = (time() - $secs);
    
$maxclass UC_POWER_USER;
    @
mysql_query("DELETE FROM users WHERE status='confirmed' AND class <= $maxclass AND last_access < $dt");

    
// lock topics where last post was made more than x days ago
/*    $secs = 7*86400;
    $res = mysql_query("SELECT topics.id FROM topics LEFT JOIN posts ON topics.lastpost = posts.id WHERE topics.locked = 'no' AND topics.sticky = 'no' AND " . gmtime() . " - UNIX_TIMESTAMP(posts.added) > $secs") or sqlerr(__FILE__, __LINE__);
  if(mysql_num_rows($res) > 0) {
    while ($arr = mysql_fetch_assoc($res))
    $pids[] = $arr['id'];
        mysql_query("UPDATE topics SET locked='yes' WHERE id IN (".join(',', $pids).")") or sqlerr(__FILE__, __LINE__);
  }
*/  
  //remove expired warnings
  
$res = @mysql_query("SELECT id FROM users WHERE warned='yes' AND warneduntil < ".time()." AND warneduntil <> 0") or sqlerr(__FILE____LINE__);
  if (
mysql_num_rows($res) > 0)
  {
    
$dt time();
    
$msg sqlesc("Your warning has been removed. Please keep in your best behaviour from now on.\n");
    while (
$arr mysql_fetch_assoc($res))
    {
      @
mysql_query("UPDATE users SET warned = 'no', warneduntil = 0 WHERE id = {$arr['id']}") or sqlerr(__FILE____LINE__);
      @
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, {$arr['id']}$dt$msg, 0)") or sqlerr(__FILE____LINE__);
    }
  }

    
// promote power users
    
$limit 25*1024*1024*1024;
    
$minratio 1.05;
    
$maxdt = (time() - 86400*28);
    
$res = @mysql_query("SELECT id FROM users WHERE class = 0 AND uploaded >= $limit AND uploaded / downloaded >= $minratio AND added < $maxdt") or sqlerr(__FILE____LINE__);
    if (
mysql_num_rows($res) > 0)
    {
        
$dt time();
        
$msg sqlesc("Congratulations, you have been auto-promoted to [b]Power User[/b]. :)\nYou can now download dox over 1 meg and view torrent NFOs.\n");
        while (
$arr mysql_fetch_assoc($res))
        {
            @
mysql_query("UPDATE users SET class = 1 WHERE id = {$arr['id']}") or sqlerr(__FILE____LINE__);
            @
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, {$arr['id']}$dt$msg, 0)") or sqlerr(__FILE____LINE__);
        }
    }

    
// demote power users
    
$minratio 0.95;
    
$res mysql_query("SELECT id FROM users WHERE class = 1 AND uploaded / downloaded < $minratio") or sqlerr(__FILE____LINE__);
    if (
mysql_num_rows($res) > 0)
    {
        
$dt time();
        
$msg sqlesc("You have been auto-demoted from [b]Power User[/b] to [b]User[/b] because your share ratio has dropped below $minratio.\n");
        while (
$arr mysql_fetch_assoc($res))
        {
            @
mysql_query("UPDATE users SET class = 0 WHERE id = {$arr['id']}") or sqlerr(__FILE____LINE__);
            @
mysql_query("INSERT INTO messages (sender, receiver, added, msg, poster) VALUES(0, {$arr['id']}$dt$msg, 0)") or sqlerr(__FILE____LINE__);
        }
    }

    
// Update stats
    
$seeders get_row_count("peers""WHERE seeder='yes'");
    
$leechers get_row_count("peers""WHERE seeder='no'");
    @
mysql_query("UPDATE avps SET value_u=$seeders WHERE arg='seeders'") or sqlerr(__FILE____LINE__);
    @
mysql_query("UPDATE avps SET value_u=$leechers WHERE arg='leechers'") or sqlerr(__FILE____LINE__);

    
// update forum post/topic count
    //$forums = @mysql_query("SELECT t.forumid, count( DISTINCT p.topicid ) AS topics, count( * ) AS posts FROM posts p LEFT JOIN topics t ON t.id = p.topicid LEFT JOIN forums f ON f.id = t.forumid GROUP BY t.forumid");
    
$forums = @mysql_query("SELECT f.id, count( DISTINCT t.id ) AS topics, count( * ) AS posts
                          FROM forums f
                          LEFT JOIN topics t ON f.id = t.forumid
                          LEFT JOIN posts p ON t.id = p.topicid
                          GROUP BY f.id"
);
    while (
$forum mysql_fetch_assoc($forums))
    {
/*
        $postcount = 0;
        $topiccount = 0;
        $topics = mysql_query("select id from topics where forumid=$forum[id]");
        while ($topic = mysql_fetch_assoc($topics))
        {
            $res = mysql_query("select count(*) from posts where topicid=$topic[id]");
            $arr = mysql_fetch_row($res);
            $postcount += $arr[0];
            ++$topiccount;
        } */
        
$forum['posts'] = $forum['topics'] > $forum['posts'] : 0;
        @
mysql_query("update forums set postcount={$forum['posts']}, topiccount={$forum['topics']} where id={$forum['id']}");
    }

    
// delete old torrents
    /*$days = 28;
    $dt = (time() - ($days * 86400));
    $res = mysql_query("SELECT id, name FROM torrents WHERE added < $dt");
    while ($arr = mysql_fetch_assoc($res))
    {
        @unlink("{$TBDEV['torrent_dir']}/{$arr['id']}.torrent");
        @mysql_query("DELETE FROM torrents WHERE id={$arr['id']}");
        @mysql_query("DELETE FROM peers WHERE torrent={$arr['id']}");
        @mysql_query("DELETE FROM comments WHERE torrent={$arr['id']}");
        @mysql_query("DELETE FROM files WHERE torrent={$arr['id']}");
        write_log("Torrent {$arr['id']} ({$arr['name']}) was deleted by system (older than $days days)");
    }
*/
    // Remove expired readposts...
    
$dt = (time() - $TBDEV['readpost_expiry']);

    @
mysql_query("DELETE readposts FROM readposts ".
        
"LEFT JOIN posts ON readposts.lastpostread = posts.id ".
        
"WHERE posts.added < $dt") or sqlerr(__FILE__,__LINE__);

}

?>
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
  #8  
Old 17th July 2013, 01:56
Dote Dote is offline
Senior Member
 
Join Date: Jul 2013
P2P
Posts: 17
Default
Quote:
Originally Posted by firefly007 View Post
Backup cleanup.php in /include/ and replace with this
Thanks alot everything works now!
Reply With Quote
Reply

Tags
problem , system , tracker

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 19:52. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.