Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   BT.Manager (phpMyBitTorrent) (http://www.bvlist.com/forumdisplay.php?f=23)
-   -   sql error in announce (http://www.bvlist.com/showthread.php?t=9133)

chromium 5th May 2013 07:39

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.

joeroberts 5th May 2013 09:01

1 Attachment(s)
try this announce.php
and can you let me know how you fixed it?

chromium 5th May 2013 09:13

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.

joeroberts 5th May 2013 09:17

torrent_torrents

Bump: you cant also go to admin->Optimize Data Base

chromium 5th May 2013 09:34

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?

joeroberts 5th May 2013 09:37

It is done in cleanup
The system automatically cleans its self to make sure the stats are rite :lol:

chromium 5th May 2013 09:40

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.

joeroberts 5th May 2013 09:45

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."';"); 



All times are GMT +2. The time now is 00:37.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.