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
TT 2.5 [moded 2.08]
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / M-BiTsy / M-BiTsy Support

2021-02-11 19:16:34
Hello guys,
is reinstalling my old TT 2.5 and has a couple of minor issues with scripting.
1. Shoutbox new torrent that has worked on an old server is now starting to fu** and does not want to work
2. When uploading a new torrent, an SQL error message will appear

Database Error in torrents-upload.php on line 274: Out of range value for column 'leechers' at row 1. Query was: UPDATE torrents SET leechers='-1', seeders='-1',times_completed='-1',last_action= '2021-02-11 18:57:56',visible='yes' WHERE id='718'.


Source code for torrent-upload.php


//EXTERNAL SCRAPE
if ($external=='yes' && $site_config['UPLOADSCRAPE']){
$tracker=str_replace("/announce","/scrape",$announce);
$stats = torrent_scrape_url($tracker, $infohash);
$seeders = (int) strip_tags($stats['seeds']);
$leechers = (int) strip_tags($stats['peers']);
$downloaded = (int) strip_tags($stats['downloaded']);

SQL_Query_exec("UPDATE torrents SET leechers='".$leechers."', seeders='".$seeders."',times_completed='".$downloaded."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$id."'");
}
//END SCRAPE

// Message shoutbox news torrent by thib
$image = $inames[0];
$membre = ( $anon == 'yes' || $CURUSER['privacy'] == 'strong' ) ? 'Anonyme' : $CURUSER['username'];
$insert = "Torrent [url=".$site_config['SITEURL']."/torrents-details.php?id=".$id."]".$torrent."[/url] upravo je postavljen od: ".($anon == 'no' ? " [url=".$site_config['SITEURL']."/account-details.php?id=".$CURUSER['id']."] ".$CURUSER["username"]."[/url]" : "")."";
SQL_Query_exec("INSERT INTO `shoutbox` (`msgid`, `user`, `message`, `date`, `userid`) VALUES(null, 'TorrOp', '$insert', '".get_date_time()."', '1')");
// End



Thanks for a help from all of you guys


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-11 19:59:35
try removing the (int)
	//EXTERNAL SCRAPE
if ($external=='yes' && $site_config['UPLOADSCRAPE']){
$tracker=str_replace("/announce","/scrape",$announce);
$stats = torrent_scrape_url($tracker, $infohash);
$seeders = strip_tags($stats['seeds']);
$leechers = strip_tags($stats['peers']);
$downloaded = strip_tags($stats['downloaded']);

SQL_Query_exec("UPDATE torrents SET leechers='".$leechers."', seeders='".$seeders."',times_completed='".$downloaded."',last_action= '".get_date_time()."',visible='yes' WHERE id='".$id."'");
}
//END SCRAPE
 
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2021-02-11 20:20:35
Thanks mate, it working now

PS
How can I change my avatar picture, this option is disabled for me right now


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-11 20:21:49
Their all INT values. Absense of declaring Type may produce warnings between newer PHP versions, and any error or notice corrupts announce output (thats why they forced errors off to avoid this, fixing the code is better solution). 
2021-02-11 20:51:53
Not sure on the avatar. I assume m-jay would know more on that if you are talking about this site. If you are talking about your own site, make a new post with code and someone may be able to help out
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by MicroMonkey on 2021-02-11 20:54:03
2021-02-11 21:17:11
Avatar is allowed I'm just a blind man, first input on profile right side


www.exyusubs.com
TorrentTrader V3.8.3 (SE)
OS: AlmaLinux 9.9 (BC)
Apache version: 2.4.71
PHP version: 8.5.13 (PHP-FPM)
MySQL version: 10.11.18-MariaDB
2021-02-12 00:17:04
Im blind also, just got my new glasses. No worries buddy. Glad everything is well :)
TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
Last edited by MicroMonkey on 2021-02-12 03:37:58
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: 8
  • Members: 0
  • Guests online: 8
  • Comments: 3
  • Messages: 1,728