Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > BT.Manager (phpMyBitTorrent)
Reply
  #1  
Old 5th May 2013, 07:39
chromium chromium is offline
Member
 
Join Date: Apr 2013
Canada
Posts: 14
Default sql error in announce
Hey There,
When I try to upload a torrent using the upload a torrent button it returns an error [Catchable fatal error: Object of class php4DOMDocument could not be converted to string in /home/a5082274/public_html/upload/taketorrent.php on line 174 ]
Edit: NVM joe , fixed it by myself.

Bump: Okay just now uploaded a torrent and it went fine but when I try to seed it from transmission , tranmission displays [tracker gave an error: "SQL Error = Insert into torrent_peers (connectable ,torrent ,peer_id ,ip ,port ,uploaded ,downloaded ,to_go ,started ,last_acti ........ "]
Would appreciate any kinda help.

Bump: edit:problem solved : fixed by itself.
Okay now whats the name of the database that stores seeder data coz the data on the website isnt probably realtime.

Last edited by chromium; 5th May 2013 at 07:57.
Reply With Quote
  #2  
Old 5th May 2013, 09:01
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
try this announce.php
and can you let me know how you fixed it?
Attached Files
File Type: php announce.php (32.4 KB, 4 views)
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #3  
Old 5th May 2013, 09:13
chromium chromium is offline
Member
 
Join Date: Apr 2013
Canada
Posts: 14
Default
Hey Joe,
I forgot to put the announce URL in the torrent and that was the issue and the 2nd error fixed by itself after a few mins.
Quote:
Okay now whats the name of the database that stores seeder data coz the data on the website isnt probably realtime.
I'd appreciate an answer to this Q.
Reply With Quote
  #4  
Old 5th May 2013, 09:17
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
torrent_torrents

Bump: you cant also go to admin->Optimize Data Base
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #5  
Old 5th May 2013, 09:34
chromium chromium is offline
Member
 
Join Date: Apr 2013
Canada
Posts: 14
Default
Hey Joe,
Thanks for replying. Now I gotta tell you a back-story , I actually challenged a friend that I will get 100 seeds today so I wanted to change the seeds row in the db but when I changed the seeds to 100 it automatically changed back to 0 after a few mins. Why is this happening?
Reply With Quote
  #6  
Old 5th May 2013, 09:37
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
It is done in cleanup
The system automatically cleans its self to make sure the stats are rite
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
  #7  
Old 5th May 2013, 09:40
chromium chromium is offline
Member
 
Join Date: Apr 2013
Canada
Posts: 14
Default
Anyway to change that?
IDC even if that messes the whole install coz I am anyways planning on doing a fresh install again.
Pls help me out bro.
Reply With Quote
  #8  
Old 5th May 2013, 09:45
joeroberts's Avatar
joeroberts joeroberts is offline
BT.Manager Owner
 
Join Date: Jan 2008
United States
Posts: 2,113
Default
in include/cleanup.php comment out these lines
PHP Code:
        #Reset Statistics. Run where there is a dead peer
        
$sql "DELETE FROM ".$db_prefix."_peers WHERE UNIX_TIMESTAMP(last_action) < UNIX_TIMESTAMP(NOW()) - ".($announce_interval+60).";"//One minute of tolerance
        
$res $db->sql_query($sql);
        if (
$db->sql_affectedrows($res) > 0) {
                
$db->sql_query("UPDATE ".$db_prefix."_torrents SET seeders = 0, leechers = 0, tot_peer = 0, speed = 0 WHERE tracker IS NULL OR backup_tracker = 'true';");

                
$sql "SELECT COUNT(*) AS tot, torrent, seeder, SUM(upload_speed) AS speed FROM ".$db_prefix."_peers GROUP BY torrent, seeder;";
                
$res $db->sql_query($sql);
                while(
$row $db->sql_fetchrow($res)) {
                        if (
$row["seeder"] == "yes"$sql "UPDATE ".$db_prefix."_torrents SET seeders = '".$row["tot"]."', speed = speed + '".$row["speed"]."' WHERE id='".$row["torrent"]."';";
                        else 
$sql "UPDATE ".$db_prefix."_torrents SET leechers = '".$row["tot"]."', speed = speed + '".$row["speed"]."' WHERE id='".$row["torrent"]."';";
                        
$db->sql_query($sql);
                }

                
$db->sql_query("UPDATE ".$db_prefix."_torrents SET tot_peer = seeders + leechers;");
        }
        
$db->sql_query("UPDATE ".$db_prefix."_torrents SET evidence = 0 WHERE evidence = 1 AND UNIX_TIMESTAMP(added) < UNIX_TIMESTAMP(NOW()) - 14*84600;");
        
$db->sql_query("UPDATE ".$db_prefix."_torrents SET visible = 'no' WHERE type != 'link' AND tot_peer <= '".$down_limit."' AND UNIX_TIMESTAMP(last_action) < UNIX_TIMESTAMP(NOW()) - ".intval($dead_torrent_interval)." AND evidence != 1 AND (TRACKER IS NULL OR ".intval($autoscrape).");");
        
$db->sql_query("UPDATE ".$db_prefix."_torrents SET visible = 'yes' WHERE tot_peer > '".$down_limit."';"); 
__________________
Do not ask me to help you work on your site that is not phpMyBitTorrent
Do not ask me to make a mod for any other source
Do not Ask me to setup your site.
I will no longer help you setup your site, there is a setup script if you have trouble with it post in the forum here or in BT.Manager™ forum
My Current Demo is here http://demo.btmanager.org/
Reply With Quote
The Following User Says Thank You to joeroberts For This Useful Post:
romano1 (31st July 2013)
Reply

Tags
announce , error , sql

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 04:14. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.