PDA

Bekijk de volledige versie : Use Torrential as web interface for Enhanced-Ctorrent:)



G-SUS
22-08-2007, 21:23
Found this interesting web interface for enhanced-ctorrent which enables you to manage your Bittorrent downloads.

Torrential uses Appweb as a webserver and needs enhanced c-torrent latest version dnh3.1-9.

1st install Enhanced c-torrent:
ipk-opt update
ipkg-opt install enhanced-ctorrent

2nd install Appweb
ipkg-opt install appweb
Run appweb: /opt/etc/init.d/S81appweb
reboot

3rd download torrential.zip on link: http://oz4.org/wp-content/uploads/2007/07/torrential.zip
Then unzip file with Winzip or Winrar and put the extracted files in the Appweb web folder /opt/var/appWeb/web/torrential through WINSCP or FTP whatever you prefer. After this use command: chmod 777 /opt/var/appWeb/web/torrential to enable the application to open the subdirectory.

Now you can configure Torrential by changing the inc_config.php in directory /opt/var/appWeb/web/torrential. Do this with vi or nano editor. If everything works OK you can also do it through the web interface http://ASUSWL700GE-ip:7777/torrential/index.php.

Most important are the login, password and directories where to put the torrent files and access the enhanced-ctorrent client. Make sure that the directories are accessible by everyone with chmod 777 /directory/subdirectory/

Finally reboot and start downloading!

The Torrential webinterface is accessible through your browser. I found out that Firefox works better than IE 7. If somehow your browser cannot access it might help to clear cache through internet options.

url: http://ASUSWL700GE-ip:7777/torrential/index.php

Source: http://oz4.org/29/coming-soon-torrential/

esbe
23-08-2007, 13:48
It looks good, but didn't you notice some problems with enhanced torrent dnh3.1-9? Because i have tried few new versions of enhanced-ctorrent few days ago but without success - using of all ones ended with "segmentation fault". Only dnh2-3 works good for me.

Fullback
01-09-2007, 03:06
Hey thanks for this ! it worked great for me, but as soon as i close my Telnet session the web stops working for me ??? any clues??

gratitude182
01-09-2007, 18:54
@esbe

you have to install man and man-pages. then i think it should work.

grat182

gratitude182
02-09-2007, 08:51
do you have installed also another package that it work? because it won't work for me. thanks

grat182

sollie
02-09-2007, 17:51
Be sure you end your download path with a "/".

That made it work for me.

Sollie.

Kopaxi
02-09-2007, 18:17
Hey thanks for this ! it worked great for me, but as soon as i close my Telnet session the web stops working for me ??? any clues??

Hi, first of all thanks for the great idea, it works great after a little working. The Enhanced-Ctorrent 3.2.9 or 3.1.9 (i don't know, the latest in the packages) works fine, with the maximum bandwith in up/download. I buyed this box only for the torrent downloading, and this is the simplest and the first of fully working thing for this function i read in the last one year, so i'm starting to like this box after one year sucking :D

Fullback: in the first run, when i closed the telnet session the web interface closed me too, but after a little searching on the appWeb site, i found the right solution. If you install the "screen", you can start the appweb in the second session. After you can detach that screen session and exit from the telnet window, the web interface is still working fine. If you want to, you can write the whole procedure into the rc.local file.

so, good luck! ;)

Kopaxi

sollie
02-09-2007, 19:31
just add the start rule to rc.local and you are done.

Sollie.

Fullback
02-09-2007, 20:15
Hey Thank you all for the Help.... I made a big mistake though In my rc.local file i tired to add appWeb at start up, and i messed up writing the code, now i can't telnet into the router to change my rc.local file ....
Here is what i wrote ******Hey i tired to add my own function in the rc.local file
fi [-x /opt/etc/init.d/S8appWeb]; then
/opt/etc/init.d/S8appWeb
if
********
now i am end up with
i get
""telnet> open
(to) 192.168.1.1
Trying 192.168.1.1...
telnet: Unable to connect to remote host: Connection refused
""" Thank you!!!
Edit/Delete Message
********** THANK you guys for any help!!! thanks for the reply.
Thank you all for the reply. p.s I should have thought of the screen idea.... Stupid me. haha :) thank you aging
****************************************I FIXED THE PROBLEM 2 DAY'S OF HARD WORKING AND I FIXED IT HAHA :) THANK YOU ALL AGING!

mingtsre
21-10-2007, 18:21
I get the following error when it goes to the home page

Fatal error: Maximum execution time of 30 seconds exceeded in /opt/var/appWeb/web/torrential/dyn_stopped.php on line 65

The appWeb looks OK and is obviously accpeting connections. Have I missed anything ? enhanced-torrent looks OK and is in the path. I also noticed

default:1 pool.0 Error: 404 "Not Found" for "/favicon.ico", file "/opt/var/appWeb/web/favicon.ico": Can't access URL

in the appWeb error log. Does anyone know what these means ?

xmeister
24-10-2007, 05:11
I'm having the exact same problem. I installed Torrential a few days ago and initially it worked well, downloaded a few larger torrents. But started recieving the below error on a few of the last torrents.

I decided to take a look at the PHP logic and how the insterface works (I've never done any PHP or Linux programming, but it looks pretty straight forward).

When you start a download, it shells to the enhanced-ctorrent client and outputs the results to a .stat file in the configured BT download directory. It also outputs the PID to the corresponding .pid file.

So for filename.torrent you'd have filename.pid and filename.stat.

The dyn_stopped.php that's causing the issue gets a list of files from the BT download directory. If it ends with .stat/.pid it thinks it's running. It tries to parse the .stat file to determine the status. You can view the .stat file at anytime to see where the download is at.

The problem with the .stat file is that it grows during the download. Enhanced-ctorrent appends the status to the file.

It seems that torrents that are having communication issues (can't connect to tracker or download) are causing the problem for me - but I've only downloaded a handful of torrents.

If you want get the page displaying, kill the process using the id from the corresponding .pid file then delete the .pid and .stat file. Your torrents will appear in stopped status. This obviously doesn't fix the problem, but at least you can start new torrents and maintain the ones that were running.

I tried changing the KeepAliveTimeout in /opt/var/appWeb/appWeb.conf from 30 to 90, but didn't make any difference, I'm not sure if this the right timer but it's the only one that's 30 in this .conf file.

Not sure what else, I noticed the code in dyn_stopped.php does a fopen on the .stat file but doesn't have any corresponding fclose, any PHP programmers out there have any thoughts on this?

Also, could Torrential run under a different PHP web server? Does the lighttpd provide similar functionality?

Regards,

X

Gizmo1007
24-10-2007, 17:33
Warning: session_start() [function.session-start]: open(/tmp/sess_dc9d58d2b552739b2e11bf058866893b, O_RDWR) failed: Permission denied (13) in /opt/var/appWeb/web/torrential/login.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/var/appWeb/web/torrential/login.php:2) in /opt/var/appWeb/web/torrential/login.php on line 2

Warning: session_write_close() [function.session-write-close]: open(/tmp/sess_dc9d58d2b552739b2e11bf058866893b, O_RDWR) failed: Permission denied (13) in /opt/var/appWeb/web/torrential/login.php on line 10

Warning: session_write_close() [function.session-write-close]: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in /opt/var/appWeb/web/torrential/login.php on line 10

Warning: Cannot modify header information - headers already sent by (output started at /opt/var/appWeb/web/torrential/login.php:2) in /opt/var/appWeb/web/torrential/login.php on line 11

Anyone come up with a solution for these issues? I have Made nearly the whole root Chmod 777 but nothing works :(

xmeister
25-10-2007, 00:39
Took a stab at the below (timeout issue). What appears to happen if the file hasn't started downloading, so 0% completed, the timeout error occurs. The percentage is calculated by rounding the downloadedamount/downloaded size. If it is 0, then it hangs, I think it's having a problem with the zero character. Can duplicate using this basic PHP script:
<?php
echo "" . @round("0"*100/"242342"). "\n\r";
?>

Made a change to dyn_progress.php in /opt/var/appWeb/web/torrential to check if downloaded amount is zero. Seems to work for me. I've attached the modified script, make a copy of the existing dyn_progress.php before updating.

I'm curious if this is a PHP bug or just how it deals with 0 character.

X

lyka
16-11-2007, 12:19
not working for me on wl500gP

going to http://192.168.1.2:7777/torrential/index.php i alwais receive this:

Warning: session_start() [function.session-start]: open(/tmp/sess_bda5fb9cc080b03b402088d4699a876b, O_RDWR) failed: Permission denied (13) in /opt/var/appWeb/web/torrent/inc_security.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /opt/var/appWeb/web/torrent/inc_security.php:2) in /opt/var/appWeb/web/torrent/inc_security.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/var/appWeb/web/torrent/inc_security.php:2) in /opt/var/appWeb/web/torrent/inc_security.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/var/appWeb/web/torrent/inc_security.php:2) in /opt/var/appWeb/web/torrent/inc_security.php on line 5

oleg firwmare 1.9.2.7-8
webbrowser firefox 2.0.0.9
enhanced-ctorrent dnh 3.2-9

any ides? Is it not compatible with wl500gP?

xmeister
17-11-2007, 00:37
I'm no appweb expert but try this..

Can you browse this:
http://192.168.1.2:7777/index.html

This is the root of the appWeb server and should show the default Mbedthis page.

Also take a look at /opt/var/appWeb/logs/error.log, it might give you some clues.

X

caterpilar
01-12-2007, 22:31
Hi, need a little help here. I donīt seem to get appweb started. When I run /opt/etc/init.d/S81appweb i says nothing, and goint to http://192.168.1.1:7777/ gives no reply. The log file says:


default:1 main Error: Can't load /opt/lib/libphp5Module.so
Reason: "File not found"
default:1 main Error: Bad directive "LoadModule" at line 79 in /opt/var/appWeb/appWeb.conf
default:1 main Error: Can't configure server using /opt/var/appWeb/appWeb.conf
default:1 main Error: Can't configure the server, exiting.


Which does not sound very good. The thing is I checked in the /opt/lib, and there is clearly a file named libphp5Module.so there. Donīt understand why it says "file not found". Ideas or clues, anyone? Thank you in advance.

AverySimonsen
14-02-2008, 19:29
I ran into a problem getting this error message from appweb:

default:1 pool.1 Error: 400 "Bad Request" for "/torrential/dyn_process.php", file "": Bad content length

the solution turned out to be changing the LimitRequestBody parameter (actually just un-commenting it) in /opt/var/appWeb/appWeb.conf

Other than this I have had to do nothing other than what was said in this thread to get it to work. Good stuff!

Edit: Although things appeared to be working fine with the newest (unstable) release of enhanced-ctorrent, download speeds were extremely low (~2kb/s). This was fixed by downgrading enhanced-ctorrent to dnh2.3 which has been recommended elsewhere.

Another thing I found is that it is a good idea to log out immediately after resuming a stopped torrent. The reason for this is that appWeb takes up 50% cpu while enhanced-ctorrent is crc-checking the partially downloaded data to determine its progress. Until you log out that is. Then enhanced-ctorrent gets all of the cpu which means it can start downloading all the sooner.

nitrox-mx
31-12-2009, 03:59
in brouser i have this problem :


Warning: session_start() [function.session-start]: open(/tmp/sess_be1a10a7d22d1d500e79806882d9ed2d, O_RDWR) failed: Permission denied (13) in /opt/var/appWeb/web/torrential/inc_security.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /opt/var/appWeb/web/torrential/inc_security.php:2) in /opt/var/appWeb/web/torrential/inc_security.php on line 2

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /opt/var/appWeb/web/torrential/inc_security.php:2) in /opt/var/appWeb/web/torrential/inc_security.php on line 2

Warning: Cannot modify header information - headers already sent by (output started at /opt/var/appWeb/web/torrential/inc_security.php:2) in /opt/var/appWeb/web/torrential/inc_security.php on line 5


in error log (/opt/var/appWeb/logs/error.log) i find this :


default:1 pool.0 Error: 404 "Not Found" for "/torrential", file "/opt/var/appWeb/web/torrential": Can't access URL
default:1 pool.0 Error: 404 "Not Found" for "/torrential/", file "/opt/var/appWeb/web/torrential/": Can't access URL
default:1 pool.1 Error: 404 "Not Found" for "/torrential/7777/torrential/index.php.", file "/opt/var/appWeb/web/torrential/7777/torrential/i$
default:1 pool.0 Error: 404 "Not Found" for "/favicon.ico", file "/opt/var/appWeb/web/favicon.ico": Can't access URL
default:1 pool.2 Error: 404 "Not Found" for "/torrential/function.session-start", file "/opt/var/appWeb/web/torrential/function.session-star$
default:1 pool.2 Error: 404 "Not Found" for "/torrential/", file "/opt/var/appWeb/web/torrential/": Can't access URL



i do the "chmod 777" file by file ... not change. still error :(