Page 2 of 7 FirstFirst 1234 ... LastLast
Results 16 to 30 of 102

Thread: [How to] rtorrent & ntorrent

  1. #16
    here is my config from wtorrent

    PHP Code:
    <?php
    // Base URL of application (where index.php is)
    define'URL''http://canbruixa.homelinux.net/wtorrent/' );
    define'BASE''http://canbruixa.homelinux.net/wtorrent/' );

    // SQLite database file (set folder permision 0777 or chmod to httpd server) (wTorrent will create database when running install.php)
    define'DB_FILE''db/database.db');

    // Host or IP to connect to rTorrent
    define'RT_HOST',                       'localhost');
    define'RT_PORT',                        8008);
    define'RT_DIR',                               'RPC2/');
    define'RT_AUTH',                               false);
    define'RT_USER',                               'admin');
    define'RT_PASSWD',                               '****');
    // where to use multicall or not
    // if wTorrent makes your rtorrent crash, set this to true
    define'NO_MULTICALL',                 true);

    // Directory in which to save uploaded .torrent files (set folder permision 0777 or chmod to httpd server)
    define'DIR_TORRENTS',         'torrents/');

    // Full path to application directory (where index.php is)
    define'DIR_EXEC',             '/opt/share/www/lighttpd/wtorrent/');

    // Permision to set for uploaded .torrent files (don't touch unless you know)
    define'PERM_TORRENTS',        0777);

    // Default location to save downloaded files (can be set for every uploaded .torrent on the ui)
    define'DIR_DOWNLOAD''/mnt/rtorrent/work/');

    // Don't touch any of the data below unless you know what you are doing
    define'DIR_LANG',             'home/lang/' );
    define'DIR_TPL',              'home/tpl/' );
    define'DIR_TPL_COMPILE',      'tpl_c/' );
    define'DIR_TPL_HTML',         'home/html/' );
    define'DIR_BACKUP',           'backup/' );
    define'DIR_UPLOAD',           'torrents/');

    define'TITLE',                        'wTorrent' );
    define'META_TITLE',           'rTorrent web interface' );
    define'META_KEYWORDS',                'rtorrent xmlrpc interface php web html' );
    define'META_DESCRIPTION',     'rtorrent web inrface using xmlrpc' );

    define'DIR_CSS_DETALLS',              'home/css/detalls.css' );
    define'DIR_CSS_ESTIL',                'home/css/estil.css' );
    define'DIR_JS',                   'home/js/javasc.js' );
    define'DIR_FAVICO',           'favicon.ico' );
    //define( 'USER_RTORRENT',      'rtorrent');

    define'DIR_IMG',              'home/img/' );
    define'SRC_INDEX',            'index.php' );

    define'SCRAMBLE',             false);
    define'APP''wTorrent' );

    // Librerias generales
    require_once( 'lib/inc/includes.inc.php' );

    // Autodeclaracion de clases
    autoload'lib/cls/''cls/''home/cls/' );
    // Definicion de rutas para UNIX
    ini_set'include_path'DIR_EXEC );
    ?>
    and my rtorrent config

    PHP Code:
    #scgi_local = /opt/var/run/rpc.socket
    scgi_port 127.0.0.1:5000
    send_buffer_size 
    65536
    min_peers 
    20
    max_peers 
    50
    max_uploads 
    5
    download_rate 
    100
    upload_rate 
    100
    directory 
    = /mnt/rtorrent/work/
    schedule watch_directory,5,5,load_start=/mnt/rtorrent/dl/*.torrent
    session = /mnt/rtorrent/session
    port_range = 51777-51780
    check_hash = yes
    use_udp_trackers = yes
    schedule = ratio,30,60,stop_on_ratio=200 

    and lightphp

    PHP Code:
                                    "mod_access",
                                    
    "mod_fastcgi",
                                    
    "mod_scgi",
    #                               "mod_cml",
    #                               "mod_trigger_b4_dl",
                                    
    "mod_auth",
    #                               "mod_status",
    #                               "mod_setenv",
    #                               "mod_fastcgi",
    #                               "mod_proxy",
    #                               "mod_simple_vhost",
    #                               "mod_evhost",
    #                               "mod_userdir",
    #                               "mod_cgi",
    #                               "mod_compress",
    #                               "mod_ssi",
    #                               "mod_usertrack",
    #                               "mod_expire",
    #                               "mod_secdownload",
    #                               "mod_rrdtool",
                                    
    "mod_accesslog" )

    ## a static document-root, for virtual-hosting take look at the
    ## server.virtual-* options
    server.document-root        "/opt/share/www/lighttpd/"

    ## where to send error-messages to
    server.errorlog             "/opt/var/log/lighttpd/error.log"

    # files to check for if .../ is requested
    index-file.names            = ( "index.php""index.html",
                                    
    "index.htm""default.htm" )
    ## deny access the file-extensions
    #
    # ~    is for backupfiles from vi, emacs, joe, ...
    # .inc is often used for code includes which should in general not be part
    #      of the document-root
    url.access-deny = ("~"".inc"".db"".tpl.php"".cls.php",".sqlite")

    $HTTP["url"] =~ "\.pdf$" {
      
    server.range-requests "disable"
    }

    ###################################################################################
    fastcgi.server              = ( ".php" =>
                          ((
                              
    "host" => "127.0.0.1",
                              
    "port" => 1026,
                                ))
                          )

    ##### wtorrent
    scgi.server = (
     
    "/RPC2" => # RT_DIR
       
    "127.0.0.1" =>
          (
          
    "host" => "127.0.0.1"# Ip where rtorrent is listening
          
    "port" => 5000# Port specified in .rtorrent.rc
          
    "check-local" => "disable"
     
    )
       )
        ) 
    hope it helps
    Last edited by polde; 06-01-2008 at 11:13.

  2. #17
    Thanks a lot

    One small thing: your lighttpd.conf is missing:

    Code:
    server.modules              = (
    at the very top (could be useful for someone else)

    Also - "server.port = 8080" is missing (?)

    Anyway - we have about the same configuration - but I still have the same problem.

    Now I have looked at my error.log from lighttpd and found this:

    Code:
    (mod_fastcgi.c.2570) FastCGI-stderr: PHP Fatal error:  Class 'SQLiteDatabase' not found in /opt/share/www/lighttpd/wtorrent/install.php on line 23
    
    (mod_fastcgi.c.2570) FastCGI-stderr: PHP Fatal error:  Class 'SQLiteDatabase' not found in /opt/share/www/lighttpd/wtorrent/lib/cls/Web.cls.php on line 46
    What is strange is that the 2 different errors comes randomly, mostly the first one - but the second is also there a couple of times (during my many retries)

    Is there something wrong with my fastcgi or with the wtorrent script ? (not very likely)

    Or have I missed something simple ? (more likely)

  3. #18
    OK here is server modul

    PHP Code:
    server.modules              = (
    #                               "mod_rewrite",
    #                               "mod_redirect",
    #                               "mod_alias",
                                    
    "mod_access",
                                    
    "mod_fastcgi",
                                    
    "mod_scgi",
    #                               "mod_cml",
    #                               "mod_trigger_b4_dl",
                                    
    "mod_auth",
    #                               "mod_status",
    #                               "mod_setenv",
    #                               "mod_fastcgi",
    #                               "mod_proxy",
    #                               "mod_simple_vhost",
    #                               "mod_evhost",
    #                               "mod_userdir",
    #                               "mod_cgi",
    #                               "mod_compress",
    #                               "mod_ssi",
    #                               "mod_usertrack",
    #                               "mod_expire",
    #                               "mod_secdownload",
    #                               "mod_rrdtool",
                                    
    "mod_accesslog" 
    port

    PHP Code:
    ## bind to port (default: 80)
    server.port                8008 
    url.access

    PHP Code:
    url.access-deny = ("~"".inc"".db"".tpl.php"".cls.php",".sqlite")

    $HTTP["url"] =~ "\.pdf$" {
      
    server.range-requests "disable"
    }

    ##
    # which extensions should not be handle via static-file transfer
    #
    # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
    static-file.exclude-extensions = ( ".fcgi"".php"".pl"".py"".rb" 
    one more thing did you install SQLlight :P

    i use 20071107 version of wtorrent AJAX give me some problems

  4. #19
    Quote Originally Posted by polde View Post
    one more thing did you install SQLlight :P

    i use 20071107 version of wtorrent AJAX give me some problems
    Well, when I wrote my last entry I had not installed the 'sqlite' package, but since then I have installed both the sqlite package, restarted everything (same problem) - removed it and installed the sqlite2 package and restarted - still same problem.

    Im using the 20071107 version of wtorrent too.

    Otherwise - our setups are similar, I have the same entrys that you have.

    I made a search and found a thread (in russian) in this forum where someone have the same problem - Link - but since I dont know russian, I dont know how they solved it

  5. #20
    I don't know why, but my rtorrent stopped working. I can connect with lighttpd, but not with rpc2 - I get "500 - Internal Server Error". When I resume screen (screen -r), I see rtorrent is not working. Any help?

  6. #21
    Hey

    For Russian translation use google

    or direct link to translated web

  7. #22
    Thanks Polde, I have read it - but I still cant find the solution (I might be stupid - I know )

    I made a total clean install (total erase of the harddrive and reset of Oleg), reinstalled everything and still have the same problem.

    I think I'm missing an important package ?

    This is what I have installed:

    Code:
    bash - 3.2.17-1 - A bourne style shell
    bzip2 - 1.0.4-2 - Very high-quality data compression program
    cyrus-sasl-libs - 2.1.22-2 - Provides client or server side authentication (see RFC 2222).
    gdbm - 1.8.3-2 - GNU dbm is a set of database routines that use extensible hashing. It works similar to the standard UNIX dbm routines.
    ipkg-opt - 0.99.163-9 - The Itsy Package Manager
    libcurl - 7.17.0-3 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
    libdb - 4.2.52-3 - Berkeley DB Libraries
    libsigc++ - 2.0.18-1 - libsigc++ implements a typesafe callback system for standard C++.
    libtorrent - 0.11.9-1 - libtorrent is a BitTorrent library with a focus on high performance and good code.
    libuclibc++ - 0.2.2-4 - C++ standard library designed for use in embedded systems
    libxml2 - 2.6.30-2 - Libxml2 is the XML C parser and toolkit developed for the Gnome project.
    libxslt - 1.1.22-1 - An XML Stylesheet processor based on libxml2
    lighttpd - 1.4.18-1 - A fast webserver with minimal memory footprint.
    nano - 2.0.7-1 - A pico like editor
    ncurses - 5.6-3 - NCurses libraries
    ncursesw - 5.6-1 - NCurses libraries with wide char support.
    openldap-libs - 2.3.38-1 - Open Lightweight Directory Access Protocol
    openssl - 0.9.7m-3 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
    pcre - 7.4-1 - Perl-compatible regular expression library
    php - 5.2.5-1 - The php scripting language
    php-fcgi - 5.2.5-1 - The php scripting language, built as an fcgi module
    readline - 5.2-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
    rtorrent - 0.7.9-2 - rtorrent is a BitTorrent client for ncurses, using the libtorrent library.
    screen - 4.0.3-2 - A screen manager that supports multiple logins on single terminal
    sqlite - 3.5.4-1 - SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.
    termcap - 1.3.1-2 - Terminal emulation library
    uclibc-opt - 0.9.28-12 - micro C library for embedded Linux systems
    xmlrpc-c - 1.11.00-2 - A library providing modular implementation of XML-RPC for C and C++.
    zlib - 1.2.3-2 - zlib is a library implementing the 'deflate' compression system.
    Can anyone see whats missing to get sqlite + php-fcgi working ?

    Again - this the error I'm getting:

    Code:
    (mod_fastcgi.c.2570) FastCGI-stderr: PHP Fatal error:  Class 'SQLiteDatabase' not found in /opt/share/www/lighttpd/wtorrent/install.php on line 23

  8. #23
    hey

    can you post your config files here

    rtorrent.conf, lihthttp.conf and wtorrent config file.

    Regards,
    M

  9. #24
    Quote Originally Posted by polde View Post
    hey

    can you post your config files here

    rtorrent.conf, lihthttp.conf and wtorrent config file.

    Regards,
    M
    Sure

    rtorrent.conf:

    PHP Code:
    min_peers 20

    max_peers 
    40

    max_uploads 
    5

    download_rate 
    1300

    upload_rate 
    1300

    directory 
    = /tmp/harddisk/torrent/download/

    schedule watch_directory,5,5,load_start=/tmp/harddisk/torrent/torrentfiles/

    port_range 5330-5480

    port_random 
    yes

    scgi_port 
    127.0.0.1:5000 
    lighttpd.conf:

    PHP Code:
    server.modules              = (

                                    
    "mod_access",

                                    
    "mod_auth",

                                    
    "mod_fastcgi",

                                    
    "mod_scgi",
                                    
    "mod_accesslog" )

    server.document-root        "/opt/share/www/lighttpd/"

    server.errorlog             "/opt/var/log/lighttpd/error.log"

    index-file.names            = ( "index.php""index.html",
                                    
    "index.htm""default.htm" )


    accesslog.filename          "/opt/var/log/lighttpd/access.log"

    url.access-deny = ("~"".inc"".db"".tpl.php"".cls.php",".sqlite")

    $HTTP["url"] =~ "\.pdf$" {
      
    server.range-requests "disable"
    }

    static-
    file.exclude-extensions = ( ".fcgi"".php"".pl"".py"".rb" )

    server.port                8081

    server
    .pid-file            "/var/run/lighttpd.pid"

    fastcgi.server              = ( ".php" =>
                          ((
                              
    "host" => "127.0.0.1",
                              
    "port" => 1026,
                                ))
                          )

    scgi.server = (
     
    "/RPC2" => # RT_DIR
       
    "127.0.0.1" =>
          (
          
    "host" => "127.0.0.1"# Ip where rtorrent is listening
          
    "port" => 5000# Port specified in .rtorrent.rc
          
    "check-local" => "disable"
     
    )
       )
        ) 
    wtorrent.conf:

    PHP Code:
    // Host or IP to connect to rTorrent
    define'RT_HOST',                       'localhost');
    define'RT_PORT',                        8081);
    define'RT_DIR',                               'RPC2/');
    define'RT_AUTH',                               false);
    define'RT_USER',                               'admin');
    define'RT_PASSWD',                               'password');
    // where to use multicall or not
    // if wTorrent makes your rtorrent crash, set this to true
    define'NO_MULTICALL',                 true);

    // Directory in which to save uploaded .torrent files (set folder permision 0777 or chmod to httpd server)
    define'DIR_TORRENTS',         'torrents/');

    // Full path to application directory (where index.php is)
    define'DIR_EXEC',             '/opt/share/www/lighttpd/wtorrent/');

    // Permision to set for uploaded .torrent files (don't touch unless you know)
    define'PERM_TORRENTS',        0777);

    // Default location to save downloaded files (can be set for every uploaded .torrent on the ui)
    define'DIR_DOWNLOAD''/tmp/harddisk/torrent/download/');

    // Don't touch any of the data below unless you know what you are doing
    define'DIR_LANG',             'home/lang/' );
    define'DIR_TPL',              'home/tpl/' );
    define'DIR_TPL_COMPILE',      'tpl_c/' );
    define'DIR_TPL_HTML',         'home/html/' );
    define'DIR_BACKUP',           'backup/' );
    define'DIR_UPLOAD',           'torrents/');

    define'TITLE',                        'wTorrent' );
    define'META_TITLE',           'rTorrent web interface' );
    define'META_KEYWORDS',                'rtorrent xmlrpc interface php web html' );
    define'META_DESCRIPTION',     'rtorrent web inrface using xmlrpc' );

    define'DIR_CSS_DETALLS',              'home/css/detalls.css' );
    define'DIR_CSS_ESTIL',                'home/css/estil.css' );
    define'DIR_JS',                   'home/js/javasc.js' );
    define'DIR_FAVICO',           'favicon.ico' );
    //define( 'USER_RTORRENT',      'rtorrent');

    define'DIR_IMG',              'home/img/' );
    define'SRC_INDEX',            'index.php' );

    define'SCRAMBLE',             false);
    define'APP''wTorrent' );

    // Librerias generales
    require_once( 'lib/inc/includes.inc.php' );

    // Autodeclaracion de clases
    autoload'lib/cls/''cls/''home/cls/' );
    // Definicion de rutas para UNIX
    ini_set'include_path'DIR_EXEC ); 
    (ports and password are fake)

    I have tried different download locations (/opt) since I read that /tmp could cause problems (?) but it didn't help.

    I have also used a session directory for rtorrent, but that didnt help either.

    Looking at it now, there might be something wrong in lighttpd.conf ?

    Thanks for your help.

  10. #25
    hey

    did u put
    PHP Code:
    extension=sqlite.so
    extension
    =pdo.so 
    to php.ini ?

    what about ntorrent did you try it ?

  11. #26
    Quote Originally Posted by polde View Post
    hey

    did u put
    PHP Code:
    extension=sqlite.so
    extension
    =pdo.so 
    to php.ini ?

    what about ntorrent did you try it ?
    ntorrent works for me.

    Just to make things clear, I did try the extensions above to php.ini after reading the translated page the you linked earlier - but it did not help me.... then.

    Now I tried it again - restarted the router and... it works!

    I dont know whats different now from my earlier setup, but I dont care anymore

    wtorrent is kind of slow, but hey - its working, and it is a wonderful tool to manage rtorrent

    BIG thanks for all your help polde!


  12. #27
    Quote Originally Posted by Pulver View Post
    I dont know whats different now from my earlier setup, but I dont care anymore
    Come to think about it - I might have forgotten to restart the router last time I tried.

    And then I erased it from php.ini

    darn

  13. #28
    Hey

    it nice that its working. I use Wtorrent to upload torrents file becuse u can put it to new folder /mnt/work/dvd for example and ntorrent for watching the transfer

  14. #29
    Hi. Nice how to.

    How can i limit the workload of rtorrent. I tried it with a torrent and after downloading for a while at fullspeed the router was almost dead ehe. It ate lots of ram and cpu and i couldn't even see webpages

    I also want to know where in that script i can use the comand nice, to put this process in low priority.

    Again, thanks for the HOWTO.

  15. #30
    Please report bugs/feature requests to:

    http://canbruixa.homelinux.net/trac/

    Thanks

Page 2 of 7 FirstFirst 1234 ... LastLast

Similar Threads

  1. Replies: 28
    Last Post: 02-06-2013, 20:58
  2. Ipkg rtorrent Packet gesucht
    By FastJack in forum German Discussion - Deutsch (DE)
    Replies: 1
    Last Post: 23-10-2007, 17:37
  3. older rtorrent version
    By FastJack in forum WL-500gP Q&A
    Replies: 1
    Last Post: 23-10-2007, 09:40
  4. [How To] Oleg Firmware installeren.
    By Dragonar in forum Dutch Discussion - Nederlands
    Replies: 7
    Last Post: 08-05-2007, 18:34
  5. [HOW TO] Timeouts beim Laden von bestimmten Seiten beheben - MTU Problem
    By modnet25 in forum German Discussion - Deutsch (DE)
    Replies: 3
    Last Post: 03-09-2006, 10:55

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •