Jump to content

Help with simple php exec command


nsdothack

Recommended Posts

 

Hello everyone

 

I have been messing around with this for over 2 plus weeks and I cant figure out why it wont work. But in a way I believe it could working knowing that torrentflux (torrentflux.com) works along with the ctorrent intergration of torrentflux. Here goes. I have made a php script that at first loads rtorrent in a bash file which starts and boots up a torrent. Well for some reason it worked on my Gentoox (xbox linux) but not any of the other linux os I tried from Fedora core 4 and centos 3. Now I moved on to ctorrent and I run the same thing and it loads the torrent from what I see on the tracker but it does not upload. What is crazy is if I use ssh and run the bash script it boots up fine. let me show you what I'm saying.

 

if you have fedora core 4+ do

 

yum install ctorrent

 

then take a torrent file that you have already downloaded and make a bash file like so

and add the following inside.

 

###########################

vi ctorrent.sh

 

#!/bin/bash

 

cd /path/to/torrents

 

ctorrent /name/and/path/to/file.torrent >/dev/null &

 

############################

 

now with php I put

 

<?php

 

exec('/path/to/ctorrent.sh');

 

print "ok check now"

?>

 

############################

 

with this very code on my windows utorrent bittorrent client I see the torrent but it is at 0% and trys to download the torrent even though it is at 100%.

Yes everything is linking to the files in the right directories because when I run the ctorrent.sh in ssh it boots up and starts pumping the data. What version I use you may ask? I used all of them with the same results. I know there must be a way to make this work because the ctorrent intergration has done it along with bittornado and right now its like php will not properly background the ctorrent and continue its funtions. I'm so determind to get this up and running that I'm willing to paypal the individual that can figure this out for me handsomely.

Link to comment
https://forums.phpfreaks.com/topic/48348-help-with-simple-php-exec-command/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.