Whoops \ Exception \ ErrorException (E_WARNING)
Undefined array key "BT_REG_FAIL_SAME_HASH" Whoops\Exception\ErrorException thrown with message "Undefined array key "BT_REG_FAIL_SAME_HASH"" Stacktrace: #8 Whoops\Exception\ErrorException in C:\laragon\www\pentor.ru\src\Legacy\Torrent.php:396 #7 Whoops\Run:handleError in C:\laragon\www\pentor.ru\src\Legacy\Torrent.php:396 #6 TorrentPier\Legacy\Torrent:tracker_register in C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php:215 #5 submit_torrent_nnm in C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php:85 #4 require in C:\laragon\www\pentor.ru\library\includes\cron\cron_run.php:68 #3 require in C:\laragon\www\pentor.ru\library\includes\cron\cron_check.php:35 #2 require in C:\laragon\www\pentor.ru\library\includes\init_bb.php:433 #1 require_once in C:\laragon\www\pentor.ru\common.php:343 #0 require in C:\laragon\www\pentor.ru\index.php:12
Stack frames (9)
8
Whoops\Exception\ErrorException
…\src\Legacy\Torrent.php396
7
Whoops\Run handleError
…\src\Legacy\Torrent.php396
6
TorrentPier\Legacy\Torrent tracker_register
…\library\includes\cron\jobs\nnmclub_copy_releases.php215
5
submit_torrent_nnm
…\library\includes\cron\jobs\nnmclub_copy_releases.php85
4
require
…\library\includes\cron\cron_run.php68
3
require
…\library\includes\cron\cron_check.php35
2
require
…\library\includes\init_bb.php433
1
require_once
…\common.php343
0
require
…\index.php12
C:\laragon\www\pentor.ru\src\Legacy\Torrent.php
        if (isset($bt_v1)) {
            $info_hash = hash('sha1', \Arokettu\Bencode\Bencode::encode($info), true);
            $info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
            $info_hash_where = "WHERE info_hash = '$info_hash_sql'";
        }

        // Getting info_hash v2
        if (isset($bt_v2)) {
            $info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($info), true);
            $info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
            $info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
        }

        // Ocelot
        if ($bb_cfg['ocelot']['enabled']) {
            self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash ?? hex2bin(substr($v2_hash, 0, 40))), 'id' => $topic_id, 'freetorrent' => 0]);
        }

        if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
            $msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
            bb_die($msg);
            set_die_append_msg($forum_id, $topic_id);
        }

        $totallen = 0;

        if (isset($info['length'])) {
            $totallen = (float)$info['length'];
        } elseif (isset($bt_v1, $info['files']) && !isset($bt_v2) && \is_array($info['files'])) {
            foreach ($info['files'] as $fn => $f) {
                // Exclude padding files
                if (($f['attr'] ?? null) !== 'p') {
                    if (isset($f['length']) && is_numeric($f['length'])) {
                        $totallen += $f['length'];
                    } else {
                        self::torrent_error_exit($lang['TORFILE_INVALID']);
                    }
                }
            }
            $totallen = (float)$totallen;
Arguments
  1. "Undefined array key "BT_REG_FAIL_SAME_HASH""
    
C:\laragon\www\pentor.ru\src\Legacy\Torrent.php
        if (isset($bt_v1)) {
            $info_hash = hash('sha1', \Arokettu\Bencode\Bencode::encode($info), true);
            $info_hash_sql = rtrim(DB()->escape($info_hash), ' ');
            $info_hash_where = "WHERE info_hash = '$info_hash_sql'";
        }

        // Getting info_hash v2
        if (isset($bt_v2)) {
            $info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($info), true);
            $info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
            $info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
        }

        // Ocelot
        if ($bb_cfg['ocelot']['enabled']) {
            self::ocelot_update_tracker('add_torrent', ['info_hash' => rawurlencode($info_hash ?? hex2bin(substr($v2_hash, 0, 40))), 'id' => $topic_id, 'freetorrent' => 0]);
        }

        if ($row = DB()->fetch_row("SELECT topic_id FROM " . BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
            $msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']);
            bb_die($msg);
            set_die_append_msg($forum_id, $topic_id);
        }

        $totallen = 0;

        if (isset($info['length'])) {
            $totallen = (float)$info['length'];
        } elseif (isset($bt_v1, $info['files']) && !isset($bt_v2) && \is_array($info['files'])) {
            foreach ($info['files'] as $fn => $f) {
                // Exclude padding files
                if (($f['attr'] ?? null) !== 'p') {
                    if (isset($f['length']) && is_numeric($f['length'])) {
                        $totallen += $f['length'];
                    } else {
                        self::torrent_error_exit($lang['TORFILE_INVALID']);
                    }
                }
            }
            $totallen = (float)$totallen;
Arguments
  1. 2
    
  2. "Undefined array key "BT_REG_FAIL_SAME_HASH""
    
  3. "C:\laragon\www\pentor.ru\src\Legacy\Torrent.php"
    
  4. 396
    
C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php
    DB()->sql_query("INSERT INTO ". BB_ATTACHMENTS_DESC ."
        (physical_filename, real_filename, extension, mimetype, filesize, filetime)
        VALUES
        ('". $torfile['physical_filename'] ."', '". $torfile['real_filename'] ."', 'torrent', 'application/x-bittorrent', '". $torfile['filesize'] ."', ". $time .")");
    $attach_id = DB()->sql_nextid();
 
    DB()->sql_query("INSERT INTO ". BB_ATTACHMENTS ."
        (attach_id, post_id, user_id_1)
        VALUES
        ($attach_id, $post_id, ". $user_id .")");
 
    DB()->sql_query("UPDATE ". BB_FORUMS ." SET
        forum_posts = forum_posts + 1,
        forum_last_post_id = $post_id,
        forum_topics = forum_topics + 1
        WHERE forum_id = $forum_id");    
 
    DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
 
    \TorrentPier\Legacy\Torrent::tracker_register($attach_id, '2', TOR_APPROVED);
}
 
Arguments
  1. 120196
    
  2. "2"
    
  3. 2
    
C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php
            $info_hash_v2 = hash('sha256', \Arokettu\Bencode\Bencode::encode($tor['info']), true);
            $info_hash_v2_sql = rtrim(DB()->escape($info_hash_v2), ' ');
            $info_hash_where = "WHERE info_hash_v2 = '$info_hash_v2_sql'";
 
                if($row = DB()->fetch_row("SELECT topic_id FROM ". BB_BT_TORRENTS . " $info_hash_where LIMIT 1")) {
                    DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
                } else {
                    $new_name = md5($subject);
 
                    $file = fopen("$attach_dir/$new_name.torrent", 'w');
                    fputs($file, $torrent);
                    fclose($file);
 
                    $torfile = array(
                        'physical_filename' => addslashes("$new_name.torrent"),
                        'real_filename' => addslashes("nnmclub-{$sql[$i]['id']}"),
                        'filesize' => (int)filesize("$attach_dir/$new_name.torrent"),
                    );
 
                    submit_torrent_nnm($subject, $message, $sql[$i]['forum_new'], $torfile, (TIMENOW + $i), $sql[$i]['user_id']);
                }
            } else {
                $content = iconv('windows-1251', 'UTF-8', $torrent);
 
                if(preg_match("#лимит скачиваний#siu", $content)) {
                    DB()->sql_query("UPDATE nnmclub_users SET time = ". TIMENOW ." WHERE login = '{$users[$j]}'");
                    $j = ($j + 1);
                    $i = ($i - 1);
                } else {
                    DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
                }
            }
            unset($tor);
        } else {
            DB()->sql_query("UPDATE nnmclub_releases SET time = ". TIMENOW ." WHERE title = '$subject'");
        }
        unset($curl);
    }
}
 
Arguments
  1. "Журнал | Моделист-конструктор №11 (ноябрь 2023) [PDF]"
    
  2. "[img=right]https://i3.imageban.ru/out/2023/12/02/a22e7bb67dfcfebb4acc6ce7e5b9c464.jpg[/img]\n[b]Издательство:[/b] АО «Редакция журнала «Моделист-конструктор»\n[b]Жанр:[/b] Научно-технический журнал\n\n[b]Формат:[/b] PDF\n[b]Качество:[/b] Обработанный скан\n[b]Иллюстрации:[/b] Черно-белые\n\n[b]Описание:[/b]\n«Моделист-конструктор» — ежемесячный отечественный популярный научно-технический журнал. Издаётся с августа 1962 года. В каждом номере журнала публикуются чертежи и схемы самых разнообразных конструкций — от приспособлений для домашнего хозяйства до самодельных микроавтомобилей и любительских самолётов, а также материалы по истории техники и движению самодеятельных конструкторов в стране и за рубежом. Авторами журнала являются как известные изобретатели и конструкторы, так и просто любители техники и народные умельцы.\n\n[b]Скриншоты:[/b]\n[img]https://i.imgur.com/uEcKUVw.jpg[/img] [img]https://i.imgur.com/gV0ltxE.jpg[/img]  [img]https://i.imgur.com/QbdDTL9.jpg[/img]  [img]https://i.imgur.com/leKcPkt.jpg[/img]"
    
  3. "125"
    
  4. array:3 [
      "physical_filename" => "b39dbd5617452f2f150f33077d274b8a.torrent"
      "real_filename" => "nnmclub-1681205"
      "filesize" => 20509
    ]
    
  5. 1710833198
    
  6. "5"
    
C:\laragon\www\pentor.ru\library\includes\cron\cron_run.php
        $cron_write_log = (CRON_LOG_ENABLED && (CRON_FORCE_LOG || $job['log_enabled'] >= 1));
        $cron_sql_log_file = CRON_LOG_DIR . '/SQL-' . basename($job['cron_script']);

        if ($cron_write_log) {
            $msg = [];
            $msg[] = 'start';
            $msg[] = date('m-d');
            $msg[] = date('H:i:s');
            $msg[] = sprintf('%05d', getmypid());
            $msg[] = $job['cron_title'];
            $msg = implode(LOG_SEPR, $msg);
            bb_log($msg . LOG_LF, CRON_LOG_DIR . '/' . CRON_LOG_FILE);
        }

        if ($job['log_sql_queries']) {
            DB()->log_next_query(100000, $cron_sql_log_file);
        }

        set_time_limit(600);
        require($job_script);

        if ($job['log_sql_queries']) {
            DB()->log_next_query(0);
            bb_log(LOG_LF, $cron_sql_log_file);
        }

        if ($cron_write_log) {
            $msg = [];
            $msg[] = '  end';
            $msg[] = date('m-d');
            $msg[] = date('H:i:s');
            $msg[] = sprintf('%05d', getmypid());
            $msg[] = round(utime() - $cron_start_time) . '/' . round(utime() - TIMESTART) . ' sec';
            $msg = implode(LOG_SEPR, $msg);
            $msg .= LOG_LF . '------=-------=----------=------=-------=----------';
            bb_log($msg . LOG_LF, CRON_LOG_DIR . '/' . CRON_LOG_FILE);

            if ($cron_runtime_log) {
                $runtime_log_file = ($job['log_file']) ?: $job['cron_script'];
                bb_log($cron_runtime_log . LOG_LF, CRON_LOG_DIR . '/' . basename($runtime_log_file));
Arguments
  1. "C:\laragon\www\pentor.ru\library\includes\cron\jobs\nnmclub_copy_releases.php"
    
C:\laragon\www\pentor.ru\library\includes\cron\cron_check.php
// Get cron jobs
$cron_jobs = DB()->fetch_rowset("
    SELECT * FROM " . BB_CRON . "
    WHERE cron_active = 1
        AND next_run <= NOW()
    ORDER BY run_order
");

// Run cron jobs
if ($cron_jobs) {
    bb_log(date('H:i:s - ') . getmypid() . ' --x- RUN jobs' . LOG_LF, CRON_LOG_DIR . '/cron_check');

    foreach ($cron_jobs as $job) {
        if ($job['disable_board']) {
            TorrentPier\Helpers\CronHelper::disableBoard();
            break;
        }
    }

    require(CRON_DIR . 'cron_run.php');

    // Update cron_last_check
    bb_update_config(['cron_last_check' => TIMENOW + 10]);
} else {
    bb_log(date('H:i:s - ') . getmypid() . ' --x- no active jobs found ----------------------------------------------' . LOG_LF, CRON_LOG_DIR . '/cron_check');
}
 
Arguments
  1. "C:\laragon\www\pentor.ru\library\includes\cron\cron_run.php"
    
C:\laragon\www\pentor.ru\library\includes\init_bb.php
        bb_log(date('H:i:s - ') . getmypid() . ' -x-- DB-LOCK try' . LOG_LF, CRON_LOG_DIR . '/cron_check');

        if (DB()->get_lock('cron', 1)) {
            bb_log(date('H:i:s - ') . getmypid() . ' --x- DB-LOCK OBTAINED !!!!!!!!!!!!!!!!!' . LOG_LF, CRON_LOG_DIR . '/cron_check');

            /** Run cron */
            if (TorrentPier\Helpers\CronHelper::hasFileLock()) {
                /** снятие файловой блокировки */
                register_shutdown_function(function () {
                    TorrentPier\Helpers\CronHelper::releaseLockFile();
                });

                /** разблокировка форума */
                register_shutdown_function(function () {
                    TorrentPier\Helpers\CronHelper::enableBoard();
                });

                TorrentPier\Helpers\CronHelper::trackRunning('start');

                require(CRON_DIR . 'cron_check.php');

                TorrentPier\Helpers\CronHelper::trackRunning('end');
            }

            if (defined('IN_CRON')) {
                bb_log(date('H:i:s - ') . getmypid() . ' --x- ALL jobs FINISHED *************************************************' . LOG_LF, CRON_LOG_DIR . '/cron_check');
            }

            DB()->release_lock('cron');
        }
    }
}

/**
 * Exit if board is disabled via trigger
 */
if (($bb_cfg['board_disable'] || is_file(BB_DISABLED)) && !defined('IN_ADMIN') && !defined('IN_AJAX') && !defined('IN_LOGIN')) {
    http_response_code(503);
    if ($bb_cfg['board_disable']) {
        // admin lock
Arguments
  1. "C:\laragon\www\pentor.ru\library\includes\cron\cron_check.php"
    
C:\laragon\www\pentor.ru\common.php
{
    return ltrim(str_replace(BB_PATH, '', $path), '/\\');
}

function sys(string $param)
{
    switch ($param) {
        case 'mem':
            return memory_get_usage();
        case 'mem_peak':
            return memory_get_peak_usage();
        default:
            trigger_error("invalid param: $param", E_USER_ERROR);
    }
}

// Initialization
if (!defined('IN_TRACKER')) {
    // Init board
    require_once INC_DIR . '/init_bb.php';
} else {
    define('DUMMY_PEER', pack('Nn', \TorrentPier\Helpers\IPHelper::ip2long($_SERVER['REMOTE_ADDR']), !empty($_GET['port']) ? (int)$_GET['port'] : random_int(1000, 65000)));

    define('PEER_HASH_EXPIRE', round($bb_cfg['announce_interval'] * (0.85 * $bb_cfg['tracker']['expire_factor'])));
    define('PEERS_LIST_EXPIRE', round($bb_cfg['announce_interval'] * 0.7));
    define('SCRAPE_LIST_EXPIRE', round($bb_cfg['scrape_interval'] * 0.7));

    define('PEER_HASH_PREFIX', 'peer_');
    define('PEERS_LIST_PREFIX', 'peers_list_');
    define('SCRAPE_LIST_PREFIX', 'scrape_list_');

    // Init tracker
    require_once BB_PATH . '/bt/includes/init_tr.php';

    header('Content-Type: text/plain');
    header('Pragma: no-cache');

    if (!defined('IN_ADMIN')) {
        // Exit if tracker is disabled via ON/OFF trigger
        if (is_file(BB_DISABLED)) {
Arguments
  1. "C:\laragon\www\pentor.ru\library\includes\init_bb.php"
    
C:\laragon\www\pentor.ru\index.php
<?php
/**
 * TorrentPier – Bull-powered BitTorrent tracker engine
 *
 * @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
 * @link      https://github.com/torrentpier/torrentpier for the canonical source repository
 * @license   https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
 */

define('BB_SCRIPT', 'index');

require __DIR__ . '/common.php';

$page_cfg['load_tpl_vars'] = [
    'post_icons'
];

// Show last topic
$show_last_topic = true;
$last_topic_max_len = 28;

// Show online stats
$show_online_users = true;

// Show subforums
$show_subforums = true;

$datastore->enqueue([
    'stats',
    'moderators',
    'cat_forums'
]);

if ($bb_cfg['show_latest_news']) {
    $datastore->enqueue('latest_news');
}
if ($bb_cfg['show_network_news']) {
    $datastore->enqueue('network_news');
}

Arguments
  1. "C:\laragon\www\pentor.ru\common.php"
    

Environment & details:

empty
empty
empty
empty
empty
Key Value
ALLUSERSPROFILE
"C:\ProgramData"
APPDATA
"C:\Users\fayfa\AppData\Roaming"
CommonProgramFiles
"C:\Program Files\Common Files"
CommonProgramFiles(x86)
"C:\Program Files (x86)\Common Files"
CommonProgramW6432
"C:\Program Files\Common Files"
COMPUTERNAME
"SERVER"
ComSpec
"C:\Windows\system32\cmd.exe"
DriverData
"C:\Windows\System32\Drivers\DriverData"
FPS_BROWSER_APP_PROFILE_STRING
"Internet Explorer"
FPS_BROWSER_USER_PROFILE_STRING
"Default"
HOMEDRIVE
"C:"
HOMEPATH
"\Users\fayfa"
LOCALAPPDATA
"C:\Users\fayfa\AppData\Local"
LOGONSERVER
"\\SERVER"
NUMBER_OF_PROCESSORS
"20"
OneDrive
"C:\Users\fayfa\OneDrive"
OneDriveConsumer
"C:\Users\fayfa\OneDrive"
OS
"Windows_NT"
Path
"C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\laragon\bin;C:\laragon\bin\apache\httpd-2.4.54-win64-VS16\bin;C:\laragon\bin\composer;C:\laragon\bin\git\bin;C:\laragon\bin\git\cmd;C:\laragon\bin\git\mingw64\bin;C:\laragon\bin\git\usr\bin;C:\laragon\bin\laragon\utils;C:\laragon\bin\mysql\mariadb-10.1.48\bin;C:\laragon\bin\nginx\nginx-1.24.0;C:\laragon\bin\ngrok;C:\laragon\bin\nodejs\node-v18;C:\laragon\bin\notepad++;C:\laragon\bin\php\php-8.1.10;C:\laragon\bin\python\python-3.10;C:\laragon\bin\python\python-3.10\Scripts;C:\laragon\bin\redis\redis-x64-5.0.14.1;C:\laragon\bin\telnet;C:\laragon\usr\bin;C:\Users\fayfa\AppData\Local\Yarn\config\global\node_modules\.bin;C:\Users\fayfa\AppData\Roaming\Composer\vendor\bin;C:\Users\fayfa\AppData\Roaming\npm;C:\Users\fayfa\AppData\Local\Microsoft\WindowsApps;"
PATHEXT
".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
PROCESSOR_ARCHITECTURE
"AMD64"
PROCESSOR_IDENTIFIER
"Intel64 Family 6 Model 63 Stepping 2, GenuineIntel"
PROCESSOR_LEVEL
"6"
PROCESSOR_REVISION
"3f02"
ProgramData
"C:\ProgramData"
ProgramFiles
"C:\Program Files"
ProgramFiles(x86)
"C:\Program Files (x86)"
ProgramW6432
"C:\Program Files"
PSModulePath
"C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules"
PUBLIC
"C:\Users\Public"
SESSIONNAME
"Console"
SystemDrive
"C:"
SystemRoot
"C:\Windows"
TEMP
"C:\Users\fayfa\AppData\Local\Temp"
TMP
"C:\Users\fayfa\AppData\Local\Temp"
USERDOMAIN
"SERVER"
USERDOMAIN_ROAMINGPROFILE
"SERVER"
USERNAME
"fayfa"
USERPROFILE
"C:\Users\fayfa"
windir
"C:\Windows"
HTTP_REFERER
"http://dvijlo.ru/"
HTTP_USER_AGENT
"claudebot"
HTTP_ACCEPT
"*/*"
HTTP_HOST
"dvijlo.ru"
REDIRECT_STATUS
"200"
SERVER_NAME
"dvijlo.ru"
SERVER_PORT
"443"
SERVER_ADDR
"192.168.1.29"
REMOTE_PORT
"44094"
REMOTE_ADDR
"54.81.185.66"
SERVER_SOFTWARE
"nginx/1.25.3"
GATEWAY_INTERFACE
"CGI/1.1"
HTTPS
"on"
REQUEST_SCHEME
"https"
SERVER_PROTOCOL
"HTTP/2.0"
DOCUMENT_ROOT
"C:/laragon/www/pentor.ru"
DOCUMENT_URI
"/index.php"
REQUEST_URI
"/"
SCRIPT_NAME
"/index.php"
CONTENT_LENGTH
""
CONTENT_TYPE
""
REQUEST_METHOD
"GET"
QUERY_STRING
""
SCRIPT_FILENAME
"C:/laragon/www/pentor.ru/index.php"
PATH_INFO
""
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1710833198.5429
REQUEST_TIME
1710833198
APP_ENV
"local"
APP_CRON_ENABLED
"true"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"cattle"
DB_USERNAME
"cattle"
DB_PASSWORD
"362085102"
Key Value
APP_ENV
"local"
APP_CRON_ENABLED
"true"
DB_CONNECTION
"mysql"
DB_HOST
"localhost"
DB_PORT
"3306"
DB_DATABASE
"cattle"
DB_USERNAME
"cattle"
DB_PASSWORD
"362085102"
0. Whoops\Handler\PrettyPageHandler
1. Whoops\Handler\PlainTextHandler
2. Whoops\Handler\PlainTextHandler