Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader
Reply
  #1  
Old 19th May 2016, 22:56
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default Upload ERROR
After i upload any torrent i get an error
Warning
: array_key_exists() expects parameter 2 to be array, null given in
/home/extremlymtorrents/www/backend/parse.php
on line
50

Upload Failed
Torrent already uploaded.

PHP Code:
<?php
//
//  TorrentTrader v2.x
//    This file was last updated: 27/June/2007
//    
//    http://www.torrenttrader.org
//
//

/*array info for ref:
announce
infohash
creation date
intenal name
torrentsize
filecount
announceruls
comment
filelist
*/


function ParseTorrent($filename) {
    require_once(
"BDecode.php") ;
    require_once(
"BEncode.php") ;

    
$TorrentInfo = array();

    global 
$array;

    
//check file type is a torrent
    
$torrent explode("."$filename);
    
$fileend end($torrent);
    
$fileend strtolower($fileend);

    if ( 
$fileend == "torrent" ) {
        
$parseme = @file_get_contents("$filename");

    if (
$parseme == FALSE) {
        
show_error_msg("Error","Parser Error: Error Opening torrent, unable to get contents",1);
    }

    if(!isset(
$parseme)){
        
show_error_msg("Error","Parser Error: Error Opening torrent",1);
    }else{
        
$array BDecode($parseme);
        if (
$array === FALSE){
            
show_error_msg("Error","Parser Error: Error Opening torrent, unable to decode",1);
        }else{
            if(
array_key_exists("info"$array) === FALSE){
                
show_error_msg("Error","Error Opening torrent",1);
            }else{
                
//Get Announce URL
                
$TorrentInfo[0] = $array["announce"];

                
//Get Announce List Array
                
if (isset($array["announce-list"])){
                    
$TorrentInfo[6] = $array["announce-list"];
                }

                
//Read info, store as (infovariable)
                
$infovariable $array["info"];
                
                
// Calculates SHA1 Hash
                
$infohash sha1(BEncode($infovariable));
                
$TorrentInfo[1] = $infohash ;
                
                
// Calculates date from UNIX Epoch
                
$makedate date('r' $array["creation date"]);
                
$TorrentInfo[2] = $makedate ;

                
// The name of the torrent is different to the file name
                
$TorrentInfo[3] = $infovariable['name'] ;

                
//Get File List
                
if (isset($infovariable["files"]))  {
                    
// Multi File Torrent
                    
$filecount "";

                    
//Get filenames here
                    
$TorrentInfo[8] = $infovariable["files"];

                    foreach (
$infovariable["files"] as $file) {
                        
$filecount += "1";
                        
$multiname $file['path'];//Not needed here really
                        
$multitorrentsize $file['length'];
                        
$torrentsize += $file['length'];
                    }

                    
$TorrentInfo[4] = $torrentsize;  //Add all parts sizes to get total
                    
$TorrentInfo[5] = $filecount;  //Get file count
                
}else {
                    
// Single File Torrent
                    
$torrentsize $infovariable['length'];
                    
$TorrentInfo[4] = $torrentsize;//Get file count
                    
$TorrentInfo[5] = "1";
                }

                
// Get Torrent Comment
                
if(isset($array['comment'])) {
                     
$TorrentInfo[7] = $array['comment'];
                }
            }
        }
    }
}
return 
$TorrentInfo;
}
//End Function
?>
Reply With Quote
  #2  
Old 20th May 2016, 01:46
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
Tell me is this a new installation ~ meaning there are 0 current entries in the database especially the table thats involved with the torrents ?
If there are, Well! then it should be self explanatory.

Look I could be wrong but it might be one or two things or even both!
i) Set perms for what every dir the torrents are going in to 0777.
ii) Look in your config file and check your paths.

Ok also where or what are u hosting this site on.

If none of this works or you have done this aready then get back to me.
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
  #3  
Old 20th May 2016, 05:11
DND DND is offline
VIP
 
Join Date: Dec 2008
Posts: 1,241
Default
are you trying this in PHP7.0.6 ?
__________________
Need HELP!? I can install:

  1. Server/VPS (Debian,CentOS,Ubuntu,Fedora, FreeBSD) Optimization and ... + Modules
  2. Webserver Windows/Linux (Apache/Lighttpd/Nginx/Mysql/PhpMyAdmin/SSL) Optimization and ... + Modules
  3. Seedbox Windows/Linux (uTorrent,rTorrent,libTorrent,ruTorrent) + Modules
  4. Multiple source code engines
  5. Linux Server Administration (security, cryptography/encryption, proxy, load balancer, custom ddos firewall)
Reply With Quote
  #4  
Old 20th May 2016, 10:07
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default
Quote:
Originally Posted by firefly007 View Post
Tell me is this a new installation ~ meaning there are 0 current entries in the database especially the table thats involved with the torrents ?
If there are, Well! then it should be self explanatory.

Look I could be wrong but it might be one or two things or even both!
i) Set perms for what every dir the torrents are going in to 0777.
ii) Look in your config file and check your paths.

Ok also where or what are u hosting this site on.

If none of this works or you have done this aready then get back to me.
Yes ! is a new installation on a Ubuntu Linux 14.04.1 / Webmin 1.791 ....all the perms are set to 777 , i think i made some changes in php.ini and there is the problem [on localhost is not the same problem]
Reply With Quote
  #5  
Old 20th May 2016, 12:24
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
OK "PM" me your ssh and PhpMyAdmin details to me and I will see what i can do.
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me

Reply With Quote
  #6  
Old 20th May 2016, 20:37
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default
I OK
I reinstall phpMyAdmin ,,,, there was an error from configuration when i update it
Reply With Quote
Reply

Tags
error , upload

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 16:28. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.