Jump to content


Photo

Pulling my hair out...


  • Please log in to reply
8 replies to this topic

#1 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 25 July 2006 - 10:50 PM

Warning: move_uploaded_file(/user/public_html/uploads//5.torrent): failed to open stream: No such file or directory in /home/phatconc/public_html/torrents-upload.php on line 205

Warning: move_uploaded_file(): Unable to move '/tmp/phpnOkSsE' to '/user/public_html/uploads//5.torrent' in /home/phatconc/public_html/torrents-upload.php on line 205



if(!$message) {
    $torrent = str_replace("_", " ", $torrent);

    $nfo = sqlesc(str_replace("\x0d\x0d\x0a", "\x0d\x0a", @file_get_contents($nfofilename)));
    $ret = mysql_query("INSERT INTO torrents (search_text, filename, owner, visible, info_hash, name, size, numfiles, type, descr, ori_descr, category, save_as, added, last_action, nfo) VALUES (" .
		implode(",", array_map("sqlesc", array(searchfield("$shortfname $dname $torrent"), $fname, $CURUSER["id"], "no", $hexhash, $torrent, $totallen, count($filelist), $type, $descr, $descr, 0 + $_POST["type"], $dname))) .
		", '" . get_date_time() . "', '" . get_date_time() . "', $nfo)");
    if (!$ret) {
      $message = "Mysql Error: ".mysql_error();
	  if (mysql_errno() == 1062)   <----205
		$message = "Torrent already uploaded!";
    }
    $id = mysql_insert_id();

    @mysql_query("DELETE FROM files WHERE torrent = $id");
    foreach ($filelist as $file) {
	  @mysql_query("INSERT INTO files (torrent, filename, size) VALUES ($id, ".sqlesc($file[0]).",".$file[1].")");
    }

    move_uploaded_file($tmpname, "$torrent_dir/$id.torrent");
	if (isset($_FILES['nfo'])) {
		move_uploaded_file($nfofilename, "$nfo_dir/$id.nfo");
	}


#2 Azkoyen

Azkoyen
  • Members
  • Pip
  • Newbie
  • 1 posts

Posted 25 July 2006 - 10:53 PM

'$torrent_dir' isn't set.

#3 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 25 July 2006 - 10:58 PM

$torrent_dir = "/user/public_html/uploads";

That is in my config file

#4 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 25 July 2006 - 11:06 PM

read the error carefully, there are two slashes after "uploads":

Warning: move_uploaded_file(/user/public_html/uploads//5.torrent): failed to open stream: No such file or directory in /home/phatconc/public_html/torrents-upload.php on line 205

Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#5 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 25 July 2006 - 11:15 PM

I seen that but i can't figure out why its doing //

#6 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 25 July 2006 - 11:30 PM

move_uploaded_file($tmpname, "$torrent_dir/$id.torrent");

you probably have an extra slash in $torrent_dir
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#7 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 25 July 2006 - 11:45 PM

found it now with my NEW problem ...

Tracker sending invalid data: <br />
<b>Warning</b>:  mysql_fetch_array(): supplied argument is not a valid MySQL result resource in <b>/home/phatconc/public_html/announce.php</b> .


any ideas?

#8 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 25 July 2006 - 11:58 PM

post your query that led to this error.
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...

#9 lordphate

lordphate
  • Members
  • PipPipPip
  • Advanced Member
  • 154 posts

Posted 26 July 2006 - 01:35 AM

I'm running a torrent tracker, that is what came when i tried to seed the file




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users