TorrentFlux.com Welcome, Guest. Please login or register.
03-15-2010, 10:12:15
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  Code Hacks and Tools
| |-+  TorrentFlux 2.1 Hacks
| | |-+  TorrentFlux 2.1-b4rt [Current: 2.1-b4rt-98]
« previous next »
Pages: 1 ... 6 7 [8] 9 10 ... 58 Go Down Print
Author Topic: TorrentFlux 2.1-b4rt [Current: 2.1-b4rt-98]  (Read 164870 times)
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« on: 04-24-2006, 11:08:10 »



moved...

since version 2.1-b4rt-94 this version is moved to :




Do you plan to update tf-b4rt with TF2.3 as a base?

the old 2.1-branch of tf-b4rt (2.1-b4rt-xxx) is not actively developed (only fixes, minors and updates) but should be still an alternative for official 2.2/2.3.
all things from the changelogs of 2.2/2.3 are ported to both tfb-branches (except the image-vali which is only in torrentflux-b4rt but there in an extended implementation)
so old branch has "all" (except the image-vali) from 2.2/2.3 already in v98.

"torrentflux-b4rt" (which will be renamed to a real different name before going final) is a new thing and has nothing to do with the official tf-lines. only thing you can do is upgrade from official tfs to torrentflux-b4rt (check the INSTALL-doc how to do that). just check out the latest alpha, its installed "in a minute" (web-based setup + upgrade).

« Last Edit: 02-02-2007, 10:16:42 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
 
michaels
Newbie
*
Offline Offline

Posts: 18



View Profile
« Reply #106 on: 05-12-2006, 21:14:24 »

Unfortunatelly, it didn't help:

Code:
PHP Notice:  Undefined index:  day in /var/www/html/torrent/functions.php on line 142, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  download in /var/www/html/torrent/functions.php on line 142, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  upload in /var/www/html/torrent/functions.php on line 143, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  total in /var/www/html/torrent/functions.php on line 144, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/torrent/index.php on line 534, referer: http://torrent/torrent/admin.php?op=configSettings

Last one is for "link mode".
Logged
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #107 on: 05-12-2006, 23:21:00 »

Unfortunatelly, it didn't help:

it did help Smiley

Code:
PHP Notice:  Undefined index:  day in /var/www/html/torrent/functions.php on line 142, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  download in /var/www/html/torrent/functions.php on line 142, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  upload in /var/www/html/torrent/functions.php on line 143, referer: http://torrent/torrent/admin.php?op=configSettings
PHP Notice:  Undefined index:  total in /var/www/html/torrent/functions.php on line 144, referer: http://torrent/torrent/admin.php?op=configSettings
this is from code from blackwidows XFER-hack that is integrated. but afaic these are only notices and nothing really bad. please ask blackwidow about it.

Code:
PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/torrent/index.php on line 534, referer: http://torrent/torrent/admin.php?op=configSettings
as you stated this is from code from "Link Mod 3.0" from DemonSpawn that is unmodified.

you might "fix" this with that in index.php:
frind this:
Code:
        $arLinks = GetLinks();
        foreach($arLinks as $link)
        {
            echo "<a href=\"".$link['url']."\" target=\"_blank\"><img src=\"images/arrow.gif\" width=9 height=9 title=\"".$link['url']."\" border=0 align=\"baseline\">".$link['sitename']."</a><br>\n";
        }
replace with:
Code:
        $arLinks = array();
        $arLinks = GetLinks();
        if (isset($arLinks)) {
            foreach($arLinks as $link) {
                echo "<a href=\"".$link['url']."\" target=\"_blank\"><img src=\"images/arrow.gif\" width=9 height=9 title=\"".$link['url']."\" border=0 align=\"baseline\">".$link['sitename']."</a><br>\n";
            }
        }

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #108 on: 05-12-2006, 23:55:28 »

little command-line-tool to do some basic operations on a torrentflux.
writing startup/shutdown scripts doing something on torrents inside torrentflux (as some have wanted) should be very easy with it.

notes:
  • this script does not use the webserver (no requests on scripts via webserver), it uses tf + client-handler API direct.
  • this is an admin-tool only as it bypasses tf-authentication and offers ability to operate on all torrents of all users. (operations are done as the user who owns the torrent)
  • because it doesnt use the webserver it must be used as the user running your webserver as the torrents are started with that user.

ill paste just some outputs as they are all pretty self-explanatory.

usage:
Code:
$:/var/www# ./fluxcli.php

Usage: fluxcli.php action [extra-args]

action:
 <torrents> : print torrents.
 <status>   : print status.
 <netstat>  : print netstat.
 <start>    : start a torrent.
              extra-arg : name of torrent as known inside torentflux
 <stop>     : stop a torrent.
              extra-arg : name of torrent as known inside torentflux
 <reset>    : reset totals of a torrent.
              extra-arg : name of torrent as known inside torentflux
 <delete>   : delete a torrent.
              extra-arg : name of torrent as known inside torentflux
 <wipe>     : reset totals, delete torrent, delete torrent-data.
              extra-arg : name of torrent as known inside torentflux

examples:
fluxcli.php torrents
fluxcli.php status
fluxcli.php netstat
fluxcli.php start foo.torrent
fluxcli.php stop foo.torrent
fluxcli.php reset foo.torrent
fluxcli.php delete foo.torrent
fluxcli.php wipe foo.torrent


torrents:
Code:
$:/var/www# ./fluxcli.php torrents

----------------------------------------
          TorrentFlux-Torrents         
----------------------------------------

 - slackware102.torrent (running)
 - debian31r2.torrent (running)

Download Speed : 461.10 (0.00) kB/s
Upload Speed : 10.70 (20.00) kB/s
Total Speed : 471.80 (20.00) kB/s
Connections : 62 (80)


netstat:
Code:
$:/var/www# ./fluxcli.php netstat

---------------------------------------
          TorrentFlux-NetStat         
---------------------------------------

 --- Connections ---
55

 --- Ports ---
49887
49899

 --- Hosts ---

host-list as known from all_services.php


operation:
Code:
$:/var/www# ./fluxcli.php stop slackware102.torrent
Stopping slackware102.torrent ...done
$:/var/www# ./fluxcli.php stop debian31r2.torrent 
Stopping debian31r2.torrent ...done
$:/var/www# ./fluxcli.php torrents

----------------------------------------
          TorrentFlux-Torrents         
----------------------------------------

 - slackware102.torrent (stopped)
 - debian31r2.torrent (stopped)

Download Speed : 0.00 (0.00) kB/s
Upload Speed : 0.00 (0.00) kB/s
Total Speed : 0.00 (0.00) kB/s
Connections : 0 (0)

$:/var/www# ./fluxcli.php start debian31r2.torrent
Starting debian31r2.torrent ...done



regards,
b4rt

« Last Edit: 05-12-2006, 23:59:12 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
xry
Newbie
*
Offline Offline

Posts: 3



View Profile
« Reply #109 on: 05-13-2006, 04:39:19 »

b4rt: Very good work Cheesy
But, could you please integrate this in the next release? It would be lovely!
http://www.torrentflux.com/forum/index.php/topic,1270.0.html ([Hack] Only Admin can see other user torrents). Smiley
Logged
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #110 on: 05-13-2006, 10:33:32 »

But, could you please integrate this in the next release? It would be lovely!
http://www.torrentflux.com/forum/index.php/topic,1270.0.html ([Hack] Only Admin can see other user torrents). Smiley
no problem. will be in next "release".

the fluxcli.php will be part of next release as well, it does not work on a v61 atm because i had to rearrange all functions. (original tf-functions.php consists of more than functions and has code in the main body of the php file.)
to have real function-libs i separated all functions out in different files.
  • functions.php : thats what still is used inside flux-webpages. some calls and includes for the function-files
  • functions.tf.php : in this file are all functions from torrentflux 2.1
  • functions.hacks.php : in this file are all the functions from the additional hacks applied
  • functions.b4rt.php:  in this file are all my custom-functions

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
arckuk
Newbie
*
Offline Offline

Posts: 2



View Profile
« Reply #111 on: 05-13-2006, 18:34:56 »

b4rt

Thanks for all your hard work with this.

I am running torrentflux 2.0 with sqlite, transmission and lighttpd on my Linkstation II (MIPSel), which is working fine. I would like to be able to upgrade to 2.1, and your mods seemed to be the best way to do it, as the generic 2.1 doesn't seem to cover transmission easily.

However, I seem to be running into similar problems to michaels, as I get a 'Warning: Invalid argument supplied for foreach() in /var/www/bt21/index.php on line 536' error, after the 'Torrent Links' header after initial log in. I modified index.php as you suggest in post number 106 in this thread. In addition, I have added a 'sitename' field to the tf_links table, as this was being referred to on line 536. Although this is only a warning, I do not get a set of torrent site links (that I think this should generate).

In addition, I get the following error:
'TorrentFlux Database/SQL Error
Debug SQL is on.
SQL: select user_id from tf_users order by user_id
Database error: SQL logic error or missing database'

The structure of the tf_users table seems fine. Does anyone have any ideas?

Thanks
« Last Edit: 05-13-2006, 18:45:10 by arckuk » Logged
3dfx
Newbie
*
Offline Offline

TF Base: Linux 2.x
Posts: 42



View Profile
« Reply #112 on: 05-13-2006, 19:09:05 »

hi b4rt
where is mysql update from 3 to 4 or 3 to 61??

thanks for support ! Cheesy
Logged

Apache 2.2.0 (migrating to lighttpd) + PHP 5.1.2 + MySQL 5.0.19 + Python 2.4.3 + RedHat 9.0

TF 2.1-b4rt-84
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #113 on: 05-13-2006, 19:24:49 »


first as your using sql-lite i must say i never really tested non-mysql scripts so far.
all i do with em is test-import into my own mysql-4 database to ensure they are basically "correct".
i wrote em on request in a form i "think" they might work on non-mysql-databases.
as i never got any feedback if they work on any database except mysql all these errors may be based upon that those scripts dont work at all with your database / with torrentflux. (tf base or additional hacks code may not like the type-changes.)

However, I seem to be running into similar problems to michaels, as I get a 'Warning: Invalid argument supplied for foreach() in /var/www/bt21/index.php on line 536' error, after the 'Torrent Links' header after initial log in. I modified index.php as you suggest in post number 106 in this thread. In addition, I have added a 'sitename' field to the tf_links table, as this was being referred to on line 536. Although this is only a warning, I do not get a set of torrent site links (that I think this should generate).
if the table tf_links lacked the field sitename there was something wrong with your install.
i just double-checked my 61-non-sql files (update from 2.1 and that for fresh install)
this is a part of em:
Code:
CREATE TABLE tf_links (
  lid INTEGER(10) NOT NULL auto_increment,
  url VARCHAR(255) NOT NULL default '',
  sitename VARCHAR(255) NOT NULL default 'Old Link',
  sort_order INTEGER(3) default '0',
  PRIMARY KEY  (lid)
) ;
so if you dont have the field sitename there went something wrong when you created your tables.

In addition, I get the following error:
'TorrentFlux Database/SQL Error
Debug SQL is on.
SQL: select user_id from tf_users order by user_id
Database error: SQL logic error or missing database'
as this is a database-error on a sql-lite-setup i cant really say whats the problem here.
my first take on this would be pls ensure your database-settings are correct.
maybe a sql-lite-experienced user knows more what may cause this error.

sorry that i cant help you more on this now, my guess is something wrent wrong on your database-setup / something in the non-mysql-scripts is not supported and failed.

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #114 on: 05-14-2006, 10:43:49 »

hi b4rt
where is mysql update from 3 to 4 or 3 to 61??

thanks for support ! Cheesy

oop sorry i did overlook that post. but bad news for users of v3.
i didnt provide update-scripts in the first "releases" so you are a bit on your own Wink
they are included since 5 and i provided and extra one for 4, to find in this misc-section.

EDIT:
just wrote an update file for v3 to v4. i test-imported it without errors so its basically correct.
be aware that your torrents-table is dropped and recreated as pre-v4 lacks specific savepath per torrent.
mysql_update_tf-b4rt-3.to.tf-b4rt-4.sql.gz

good luck,
b4rt
« Last Edit: 05-14-2006, 10:59:53 by b4rt » Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
arckuk
Newbie
*
Offline Offline

Posts: 2



View Profile
« Reply #115 on: 05-14-2006, 13:53:17 »

Thanks b4rt for looking into that. The database I was using came from someone else's vanilla 2.1 sqlite database, and I updated it with your 2.1 to b4rt sql update. It seemed to work okay, but whatever happened it didn't work properly. I've done some work to update your sql_torrentflux_tf-b4rt-61.sql for sqlite, it isn't there yet, but I think I'm going in the right direction. I'm a bit of a newbie in sqlite, and haven't used unix extensively for a few years, so it's slow going.

Hopefully, if I get a working version of your sql_torrentflux_tf-b4rt-61.sql script for sqlite, I can post it here, although I'm away from home for a few days.
Logged
xry
Newbie
*
Offline Offline

Posts: 3



View Profile
« Reply #116 on: 05-14-2006, 14:08:59 »

I don't know if someone has posted this before, but when i try to stop torrents with the checkboxes, i get lots of these errors:
Quote
Warning: Missing argument 3 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.transmission.php on line 101

Warning: Missing argument 4 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.tornado.php on line 119

Warning: Cannot modify header information - headers already sent by (output started at /home/xry/public_html/tflux/ClientHandler.transmission.php:101) in /home/xry/public_html/tflux/multi.php on line 85
Logged
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #117 on: 05-14-2006, 14:44:21 »

I don't know if someone has posted this before, but when i try to stop torrents with the checkboxes, i get lots of these errors:
Quote
Warning: Missing argument 3 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.transmission.php on line 101

Warning: Missing argument 4 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.tornado.php on line 119

Warning: Cannot modify header information - headers already sent by (output started at /home/xry/public_html/tflux/ClientHandler.transmission.php:101) in /home/xry/public_html/tflux/multi.php on line 85

this error "shouldnt" be present in 61 anymore.
the source of this error is when a handler-subclass cant get all needed params to issue a stop-torrent-call.

you use 61 or 6 ?
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #118 on: 05-14-2006, 14:52:49 »

Thanks b4rt for looking into that. The database I was using came from someone else's vanilla 2.1 sqlite database, and I updated it with your 2.1 to b4rt sql update. It seemed to work okay, but whatever happened it didn't work properly. I've done some work to update your sql_torrentflux_tf-b4rt-61.sql for sqlite, it isn't there yet, but I think I'm going in the right direction. I'm a bit of a newbie in sqlite, and haven't used unix extensively for a few years, so it's slow going.

Hopefully, if I get a working version of your sql_torrentflux_tf-b4rt-61.sql script for sqlite, I can post it here, although I'm away from home for a few days.

any help concerning systems i dont run myself are highly appreciated. as i can only write em in theory and that may be far from what really works.
another nice thing would be feedback about the untested cases as there may be more ppl using x y and i can only be very vague about stuff not really tested.
working solutions ... really nice of course if you have already one at hand Wink

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
iemeeltje
Newbie
*
Offline Offline

Posts: 7



View Profile
« Reply #119 on: 05-14-2006, 15:03:59 »

I don't know if someone has posted this before, but when i try to stop torrents with the checkboxes, i get lots of these errors:
Quote
Warning: Missing argument 3 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.transmission.php on line 101

Warning: Missing argument 4 for stoptorrentclient() in /home/xry/public_html/tflux/ClientHandler.tornado.php on line 119

Warning: Cannot modify header information - headers already sent by (output started at /home/xry/public_html/tflux/ClientHandler.transmission.php:101) in /home/xry/public_html/tflux/multi.php on line 85

this error "shouldnt" be present in 61 anymore.
the source of this error is when a handler-subclass cant get all needed params to issue a stop-torrent-call.

you use 61 or 6 ?


Same warnings here, using 61 (vanilla 61 install with 6 to 61 dbupgrade). I didn't realize that this was solved by 61, it wasn't in the issues list (?).

Greetz,
iemeeltje.
Logged
b4rt
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 543



View Profile WWW
« Reply #120 on: 05-14-2006, 17:23:55 »

Same warnings here, using 61 (vanilla 61 install with 6 to 61 dbupgrade). I didn't realize that this was solved by 61, it wasn't in the issues list (?).

wasnt in the issue-list cause it was never reported and i was lazy... i just saw it myself on my own version.
but after fixing the factory-ctors these errors were gone so i was quite sure they were related to that.
nevertheless, the source of the error is the same: the handlers cant get (for some reason) the wanted params to issue a stop-torrent-call.
i guess your try was to stop multiple mixed (tornado + transmission) clients in one operation with dropdown-menu.

one easy thing to check if things are right is:
check the links the torrent-stop-buttons are linked with.
if the "kill" param is empty there is something wrong because the handler cant get the pid of the torrent in the dir-list.

and additionally forget the text just read because i already modified the code of the client-handler-interface and its implementations to handle that case properly. (default params are given through the function-hierarchy and if base-class processing the call gets an empty pid and really needs one (its only needed to shoot a torrent-client if it hangs) it rereads the pid from the torrents pid-file)

i attach my current version of the affected client-handler-files to this post.
out of mind i would say they should work on your 61. (actually my current codebase is already quite different to 61)
so just exchange the 3 files and these warnings should be history.

just updated issue-list to have that issue included, lazy me Wink

regards,
b4rt
Logged

torrentflux-b4rt svn-trunk
Linux 2.4.34.1, Apache 2.0.59, PHP 4.4.5, Perl 5.8.8, Python 2.5, MySQL 4.1.22
Pages: 1 ... 6 7 [8] 9 10 ... 58 Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP