Giter Club home page Giter Club logo

nexusphp's People

Contributors

2502040155 avatar bacz00 avatar burpheart avatar ex-hentai avatar fcatme avatar imgbotapp avatar koalang avatar plexpt avatar rabbitwit avatar rey50 avatar tanapok avatar unclesusan avatar xiao-k233 avatar xiaomlove avatar xqw8889 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nexusphp's Issues

关于邮件SMTP发送设置

故障:

源代码:

$transport = (new Swift_SmtpTransport($setting['smtpaddress'], $setting['smtpport'], $setting['smtpport'] == 465 ? 'ssl' : null))

在调用swiftmailer时,若要调整smtp tls 或 ssl 设置时,管理面板并没有这个选项。
同时,邮件无法发出,nexusPHP log 如下(使用Microsoft office 365 bussiness 邮件SMTP):

[2022-01-26 04:11:01] [cabc61f05950703a1370433418db373a] [1] [295aacdbb0a4ccf197bdd7a49190cbee] [1] [5.220] local.info /www/wwwroot/站点名称-已脱敏处理/include/functions.php:1447 sent_mail send email fail: Expected response code 250 but got code "451", with message "451 5.7.3 STARTTLS is required to send mail [HK2PR03CA0046.apcprd03.prod.outlook.com]

解决方案:

functions.php调整如下(请先在管理面板内设置好正确的smtp信息)(以 port 587 + STARTTLS 为例):

$transport = (new Swift_SmtpTransport($setting['smtpaddress'], $setting['smtpport'], $setting['smtpport'] == 587 ? 'tls' : true))

使用 SSL 请直接将'tls' : true改成'ssl' : true (大概,我没试过)

IMDb no poster showed

Hello,

When I enable the IMDb System, it find well all the info but no poster is showed.
For all searches, the result is the "pic/nophoto.gif" picture.

I have already made the "composer update" command.

Can you help me please ?
Thanks.

Shoutbox smilies

Hello,

I have added smilies to the shoutbox, it's well showed under the shout:
smilies

But when I select it to show in the shoutbox, I have only the code and not the gif, so:
em208

I have only added it in "functions.php" file so:
functions

Do I need to change another file ?
Thanks.

添加广告后返回 HTTP 500

环境

NexusPHP 版本:NexusPHP v1.6.0-beta12
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4

故障

尝试在 管理组面板 -> ..:: 针对版主开放 ::.. -> 广告管理 中添加广告,添加位置选择任意皆会返回 HTTP 500 。

详情:
添加广告内容:
chrome_3a4KBXiEZx
返回信息 & payload:
chrome_DcQaANwCMO
chrome_8F3ub0CQU7

日志显示:
[2022-01-27 21:13:59] [292561f29a9701680469419276513fb0] [1] [295aacdbb0a4ccf197bdd7a49190cbee] [0] [0.168] local.info /www/wwwroot/站点名称-已脱敏处理/nexus/Database/NexusDB.php:80 Nexus\Database\NexusDB->query Column 'starttime' cannot be null [INSERT INTO advertisements (enabled, type, position, displayorder, name, parameters, code, starttime, endtime) VALUES ('1', 'text', 'belownav', '1', '测试', 'a:3:{s:7:\"content\";s:12:\"测试广告\";s:4:\"link\";s:19:\"https://example.com\";s:4:\"size\";s:4:\"30pt\";}', '<a href=\"adredir.php?id=1&amp;url=https%3A%2F%2Fexample.com\" target=\"_blank\"><span style=\"font-size: 30pt\">测试广告</span></a>', NULL, NULL)] #0 /www/wwwroot/站点名称-已脱敏处理/nexus/Database/DBMysqli.php(28): mysqli->query() #1 /www/wwwroot/站点名称-已脱敏处理/nexus/Database/NexusDB.php(78): Nexus\Database\DBMysqli->query() #2 /www/wwwroot/站点名称-已脱敏处理/nexus/Database/helpers.php(21): Nexus\Database\NexusDB->query() #3 /www/wwwroot/站点名称-已脱敏处理/include/globalfunctions.php(69): mysql_query() #4 /www/wwwroot/站点名称-已脱敏处理/public/admanage.php(349): sql_query() #5 {main}

解决方案

根据日志来看,starttime与endtime似乎不能留空,但管理面板却显示:
image

起始时间 & 终止时间 必须填写。(如果您使用的是 NexusPHP v1.6.0-beta12 或更早版本)
需要立即生效的话,请将 起始时间 设定为任意早于当前时间的时刻。
终止时间 请自行酌情填写。不能留空。

Seed points stills to 0.0

Hello,

I use the v1.6.3 on Ubuntu 20.04 with nginx, PHP 8.0, MySQL 8. Redis is installed and I have added the cronjobs.

All seems to work, except the seed points, it stills to zero (0.0).

It's a new installation, no update.

Do you have an idea why this doesn’t work?

Thanks.

更正下载时mutli-tracker的情况

直接引入 Rhilip\Bencode 的patch后,此处下载种子多tracker的情况并不与 NexusPHP 默认等效。 NexusPHP 默认实现其实是被注释掉的 L112-L113。

if (count($announce_urls) > 1) {
foreach ($announce_urls as $announce_url) {
/** d['announce-list'] = [[ tracker1, tracker2, tracker3 ]] */
$dict['announce-list'][0][] = $ssl_torrent . $announce_url . "?authkey=$trackerReportAuthKey";
/** d['announce-list'] = [ [tracker1], [backup1], [backup2] ] */
//$dict['announce-list'][] = [$ssl_torrent . $announce_url . "?passkey=" . $CURUSER['passkey']];
}
}

具体说明见 BEP0012 或本人之前的解读文章 : 漫谈PT(6):Multitracker and client behaviour - R酱小窝 ~ 个人博客

建议添加一个配置项,来对该功能进行管理。

题外话,目前是不推荐站点设置 Multitracker 的,因为 BEP007 的更新( bittorrent/bittorrent.org#101 ),会导致多次announce相同数据(视 tracker 数、peer的ip数以及不同tracker域名能解析出来的ip数 ,announce 次数倍乘,如果是 hybrid torrents 就更惨了)。而这点是目前NexusPHP的tracker没法较好处理的。

关于IP限制问题

能否增加一个白名单,在此白名单内IP无限次尝试登陆与抓取信息(给后端)

Preview upload

Hi,

Is it possible to add a preview function on the upload page to see the description textarea before to upload it ?

Thanks 🙂

Question, IPv6 visitor failure to send e-mail

Hello,

i am using original Nexus script, not this reworked version and when i see IPv6 adrress in my profile /usercp.php
then the script fails to send out e-mail:
lang/langhere/lang_functions.php: 'text_unable_to_send_mail' => "...

it happens when IPv6 user try to submit personal message or new torrent

include/functions.php: @mail($to, "=?".$hdr_encoding."?B?".base64_encode($subject)."?=", $body, "From: ".$SITEEMAIL.$eol."Content-type: text/html; charset=".$hdr_encoding.$eol, "-f$SITEEMAIL") or stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail']);

takeupload.php:if ($emailnotify_smtp=='yes' && $smtptype != 'none')
{
...
sent_mail($to,$SITENAME,$SITEEMAIL,change_email_encode(validlang($current_lang),$lang_takeupload_target[validlang($current_lang)]['mail_title'].$torrent),change_email_encode(validlang($current_lang),$body_arr[validlang($current_lang)]),"torrent upload",false,false,'',get_email_encode(validlang($current_lang)), "eYou");

anyone please having idea which particular code in which file may be causing this bug or where it was fixed in this repository?
I am using SMTP, external mail sending.

The error can be bypassed by commenting out
or stderr($lang_functions['std_error'], $lang_functions['text_unable_to_send_mail'])
in include/functions.php
but how to discover what is the actual error cause in case one is using IPv6?

upload torrent error takeupload.php ERR ACCESS DENIED

Error occurs when upload a torrent:

This site can’t be reachedThe webpage at https://***/takeupload.php might be temporarily down or it may have moved permanently to a new web address.
ERR_ACCESS_DENIED

When I check the nginx error log:

2021/12/20 22:24:55 [error] 4009749#0: *1368918 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: returnto in /www/wwwroot/.../public/amountupload.php on line 18" while reading upstream, client: 172.70.98.33, server: ..., request: "GET /amountupload.php HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-74.sock:", host: "...", referrer: "https://.../staffpanel.php"
2021/12/20 22:26:02 [error] 4009749#0: *1369186 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined variable: CURUSER in /www/wwwroot/.../public/shoutbox.php on line 16PHP message: PHP Notice:  Trying to access array offset on value of type null in /www/wwwroot/.../public/shoutbox.php on line 16PHP message: PHP Notice:  Trying to access array offset on value of type null in /www/wwwroot/.../public/shoutbox.php on line 27PHP message: PHP Notice:  Trying to access array offset on value of type null in /www/wwwroot/....public/shoutbox.php on line 97" while reading response header from upstream, client: 172.70.210.223, server: ..., request: "GET /shoutbox.php?type=helpbox HTTP/2.0", upstream: "fastcgi://unix:/tmp/php-cgi-74.sock:", host: "...", referrer: "https://.../login.php"

There is no error message related to takeupload.php.

The permissions are set to 777 to the entire directory.

Using: v1.6.0-beta12

Idea: an English-speaking place to talk about NexusPHP

Hello friends. I wrote a comment at Discuss, but I'd like to mention it here as well, because I'm worried it might not get noticed.

I want to join the team of maintainers and help make NexusPHP better. My goal is to migrate a private tracker to this new engine. Maybe even two trackers. I have already contributed to UNIT3D engine in the past.
However, I couldn't join your QQ group and recently can't even login to QQ at all (I guess because of some new geo-block).

So could you please create an official Discord/Telegram/IRC/Matrix server where English speakers can ask questions, get answers and maybe even coordinate some coding work with you? I'd like to know what your priorities are, what can be worked on, etc.
Of course I can decide on the tasks by myself, but it would be much better if you could provide some guidance.

I noticed that the project became a bit stale (no updates since June), so I hope I can bring some fresh blood to it.

std_not_bencoded_file - any way around this?

Hello,
i am using older version of the Nexus script. And some torrent file upload results in:
std_not_bencoded_file

takeupload.php:

require_once("include/benc.php");
$dict = bdec_file($tmpname, $max_torrent_size);
if (!isset($dict))
bark($lang_takeupload['std_not_bencoded_file']);

You have made some modifications to the bencode since the old script i am using:
5c4c2cc#diff-b977b464c341a216346db9bcb81f524681989d30ee21ab46dd65e2669fdaea25

i have tried to merge these changes various ways but there is empty white screen.

Does it mean that there is no way to process this .torrent file for Nexus script purposes? Have to tell user to re-create torrent using different Bittorrent client?

error with location.php [Class "config" does not exist]

2021/05/05 16:05:48 [error] 1042#0: *2551 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught ReflectionException: Class "config" does not exist in /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Container/Container.php:833
Stack trace:
#0 /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Container/Container.php(833): ReflectionClass->__construct()
#1 /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Container/Container.php(714): Illuminate\Container\Container->build()
#2 /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Container/Container.php(652): Illuminate\Container\Container->resolve()
#3 /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(119): Illuminate\Container\Container->make()
#4 /home/wwwroot/local.domain/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(275): app()
#5 /home/wwwroot/local.domain/public/location.php(9): config()
#6 {main}

Next Illuminate\Contracts\Container\BindingResolutionException: Target class [config] does not" while reading response header from upstream, client: 37.146.144.208, server: local.domain, request: "GET /location.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "local.domain", referrer: "http://local.domain/staffpanel.php"

候选区无法查看评论

NexusPHP 版本:NexusPHP v1.6.0-beta12
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4

该候选有一条评论。
image
点击查看后,php报告如下错误:
image

Fatal error: Uncaught Error: Undefined constant "lastpagedefault" in /www/wwwroot/站点-脱敏/public/offers.php:210 Stack trace: #0 {main} thrown in /www/wwwroot/站点-脱敏/public/offers.php on line 210

ptgen服务意见

首先感谢能使用pt-gen服务。也很希望ptgen能服务更多站点。
但是我对直接将apiendpoint直接指向公开demo表示担忧,毕竟demo使用人数较多,且说明中也明确提及不要大批量请求demo站点而应该自建cfworker。

能否做以下改动?

  1. 默认配置值改为空,而不是直接写成demo域名,由安装程序在安装时询问用户是否使用ptgen类似服务以及使用哪个endpoint,并写入配置文件中。毕竟由用户设定的行为和直接写入初始配置的行为造成的影响可能存在较大差异。
  2. 改为数据库强缓存或者文件缓存(类似imdbphp那种实现),而不是redis的24小时过期。改由cleanup定期少量多次的对较老数据进行更新,或者和之前一样由用户触发retriver的形式进行更新。毕竟其实对于资源简介,其实更新并没有那么频繁。

Minor / Median imdb infos

Hello,

When I select minor or median imdb infos tooltip, there is no action, nothing happens.
When it's off, I have well the torrent name in tooltip.

Do I need to install a javascript function or a php extension ?

H&R bug

The hr.ban user when counts reach field is required.

This message when I try to enable H&R in the admin dashboard.

Screenshot here : https://imgur.com/FV8Rtf7

无法触发自动清理未验证用户

NexusPHP 版本:NexusPHP v1.6.0-beta12
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4

故障

//3.delete unconfirmed accounts

image
站点启动几十天了,未验证用户无法被自动清理。(也许有可能是我自己的问题?)
自动清理配置:
image

不确定是哪出了问题。

number_format() error

2022/04/16 01:05:10 [error] 9043#0: *3618 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: number_format(): Argument #1 ($num) must be of type float, string given in /home/wwwroot/public/index.php:365
Just got this error on index page

recover.php

2021/08/22 23:33:29 [error] 22116#0: *3468 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "mail_three_1" in /home/wwwroot/nexusphp/public/recover.php on line 99PHP message: PHP Warning:  Undefined variable $lang_confirm_resend in /home/wwwroot/nexusphp/public/recover.php on line 100PHP message: PHP Warning:  Trying to access array offset on value of type null in /home/wwwroot/nexusphp/public/recover.php on line 100PHP message: PHP Fatal error:  Uncaught Error: Undefined constant "SMTP" in /home/wwwroot/nexusphp/include/functions.php:1385
Stack trace:
#0 /home/wwwroot/nexusphp/public/recover.php(105): sent_mail()
#1 {main}
  thrown in /home/wwwroot/nexusphp/include/functions.php on line 1385" while reading response header from upstream, client: 95.30.232.81, server: lp-bits.tk, request: "GET /recover.php?id=1&secret=e42b72fc4014ad0243b3543e8bc37dc9 HTTP/1.1"

Please help 🙏🙏🙏

"宣传链接“ - ”个性条“ 无法使用

NexusPHP 版本:NexusPHP v1.6.2
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4
站点权限:777 by user:www
隐私等级:“普通” 或 ”低“


image
尝试直接访问该图片:
https://站点/mybar.php?userid=1.png

报告如下错误:

Warning: imagecreatefrompng(/www/wwwroot/站点/pic/userbar/0.png): Failed to open stream: No such file or directory in /www/wwwroot/站点/public/mybar.php on line 24

Fatal error: Uncaught TypeError: imagealphablending(): Argument #1 ($image) must be of type GdImage, bool given in /www/wwwroot/站点/public/mybar.php:25 Stack trace: #0 /www/wwwroot/站点/public/mybar.php(25): imagealphablending() #1 {main} thrown in /www/wwwroot/站点/public/mybar.php on line 25

$my_img=imagecreatefrompng(getFullDirectory("pic/userbar/".$bgpic.".png"));


尝试访问另一图片:
https://站点/cc98bar.php/id1.png

Fatal error: Uncaught Exception: Serialization of 'GdImage' is not allowed in /www/wwwroot/站点/classes/class_cache_redis.php:327 Stack trace: #0 /www/wwwroot/站点/classes/class_cache_redis.php(327): serialize() #1 /www/wwwroot/站点/classes/class_cache_redis.php(214): class_cache_redis->serialize() #2 /www/wwwroot/站点/public/cc98bar.php(123): class_cache_redis->cache_value() #3 {main} thrown in /www/wwwroot/站点/classes/class_cache_redis.php on line 327

同时,/站点/public/pic/userbar目录下仅有一个0.png文件。

Promote users error

Hello xiaomlove, how are you?
I'm running your project on my tracker and I'm having a problem promoting users...

The default for poweruser is: '4', '50', '40000', '1.05'.

Could you explain to me what the 40000 is? Is there any test I can make???

无法查看或编辑某些用户

NexusPHP 版本:NexusPHP v1.6.0-beta12
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4

故障

UID 6 与 5 对比
image
以SysOp身份登录站点,想要编辑某些用户信息时,发生如上情况。部分用户无法查看或编辑详细信息。

排障尝试

已排除:个人隐私等级设置的影响

隐私等级 普通  低(邮箱地址公开)  强(个人信息全部隐藏)
  • 赋予另一用户sysop权限
    结果:相同结果,同样部分用户无法查看/编辑

  • 检查数据库 表 :users
    未发现异常(也许有?没检查出来)

等待进一步排查。
若代码作者需要数据库dump文件或其他日志,请告诉我。

Tracker: [Failure reason "regular expression err for agent

Hi, I use rtorrent 0.9.8 / libtorrent 0.13.8 but I have this error message in ruTorrent:

Tracker: [Failure reason "regular expression err for agent: tTorrent v1.0.0, please ask sysop to fix this"]

Also, when I delete tTorrent 1.0.0 from the agent_allowed_family table, ruTorrent returns another error, the client banned error message.

rtorrent is well added in the agent_allowed_family table and it working because all the other seedbox made with it don't have the problem. Do you have an idea about this error ?

Beta 14 installation error

Hi,

I receive this error during the install process, in the step 4:

Error: ["","* Application In Production! *","",""," Do you really wish to run this command? (yes/no) [no]:"," > Command Canceled!"]

使用宝塔安装的时候好像报错.

不知是不是我技术问题,我用宝塔安装的时候报502错,检查了下应该是配置文件问题,具体哪儿问题查半天没查出来.
另外宝塔Nginx下PHP默认配置好像是Unix Socket,你的安装教程fastcgi_pass监听好像是TCP Socket.
使用Unix Socket是否会效率更高一些?

功能建议:OAuth支持

[需求]: 希望支持OAuth

[使用场景]: 支持第三方登录(比如Github,Google),用户无需多注册账号

SQL注入

NexusPHP中的 0 + $_GET[] 是为了令传入的必须是数字,以此防止SQL注入

而在此版本中将其改为了 $_GET[] ?? 0,存在注入问题。

can't upload torrent

I just Disable Small Decription and cant upload torrent
2021/06/03 11:31:29 [error] 1087#0: *2386 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "small_descr" in /home/wwwroot/******/public/takeupload.php on line 64PHP message: PHP Fatal error: Uncaught Nexus\Database\DatabaseException: Column 'small_descr' cannot be null [INSERT INTO torrents (filename, owner, visible, anonymous, name, size, numfiles, type, url, small_descr, descr, ori_descr, category, source, medium, codec, audiocodec, standard, processing, team, save_as, sp_state, added, last_action, nfo, info_hash, pt_gen, tags, technical_info) VALUES ('******.torrent', '1', 'yes', 'no', '******', '3128225624', 1, 'single', '', null, '[attach]9f7aeeee9974999c29223c01d3b834d8[/attach][attach]bfcc2f12bd4e7342d269951817aa4db8[/attach]\r\n[attach]2b444dacb8635b340518789989145a97[/attach][attach]e7ae7ae41263a60b74f071ceb9343388[/attach]\r\n\r\n[color=#0000A0][b]August 10, 2013\r\nChiba City, Japan\r\nQVC Marine Field\r\nSummer Sonic - Marine Stage[/b][/color]\r\n\r\n[b]Tracklist:[/b]\r\nGiven Up\r\nLost In Th" while reading response header from upstream, client: 37.146.144.208, server: ******, request: "POST /takeupload.php HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi.sock:", host: "lp-bits.tk", referrer: "http://******/upload.php"

宝塔面板安装NexusPHP1.6成功步骤

宝塔Nginx 1.18.0 + MySQL 5.6.50 + PHP-7.2 + redis 安装要点

安装准备
安装如下php扩展
redis扩展缓存器,需重启PHP-7.2
gmp扩展
fileinfo扩展

开启被禁用php函数
putenv()
proc_open

以下必须在 /www/wwwroot/192.168.1.118 下ssh执行:

git clone -b v1.6.0-beta3 https://github.com/xiaomlove/nexusphp.git ./ 克隆v1.6.0-beta3移动到根目录 开发版代码 内容提交会出错,不建议使用

推荐发布版代码
wget https://github.com/xiaomlove/nexusphp/archive/v1.6.0-beta3.zip
unzip v1.6.0-beta3.zip 解压缩,
mv -R nexusphp-1.6.0-beta3 /www/wwwroot/192.168.1.118 移动到根目录

composer install,安装依赖

composer update,更新可能会过时的依赖关系

cp -R nexus/Install/install public/,复制 nexus/Install/install 到 public/,保证最后 public/install/install.php 存在

chmod -R 0777 /www/wwwroot/192.168.1.118,设置根目录赋予 0777 权限
以上准备工作做完,打开网站ip/域名正常会跳转安装界面。

有问题可查阅安装日志:/tmp/nexus_install_20210305.log
安装日志包含敏感数据,不要泄露。

完成后,为安全起见,请删除以下 /www/wwwroot/192.168.1.118/public/install 目录。

宝塔nginx 站点配置如下(可能需重启nginx)


server {
    listen 80;
    listen [::]:80;
    server_name 192.168.1.118;
    index index.php index.html index.htm default.php default.htm default.html;
    # 以实际为准
    root /www/wwwroot/192.168.1.118/public;

    #PHP-INFO-START  PHP引用配置,可以注释或修改
    include enable-php-72.conf;
    #PHP-INFO-END
    
    location / {
        index index.html index.php;
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php {
        # 以实际为准
        fastcgi_pass 127.0.0.1:9000; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    access_log  /www/wwwlogs/192.168.1.118.log;
    error_log  /www/wwwlogs/192.168.1.118.error.log;
}

Mediainfo parser

Is it any way to parse mediainfo on details.php?
Like hdbits.org Thanks

Sticky colors don't change

Hello,

I try to change the sticky first and second colors, but that changes nothing.
I put #57017b in first, and #555f64 in second.

With the beta 12 it worked but now with the 1.6.3 it doesn't work.

Do you have an idea why ?

选择性的佩戴兑换过的勋章

NexusPHP 版本:NexusPHP v1.6.0 正式版
PHP 版本:PHP 8.0
Mysql 版本:5.7.34
Redis 版本:Redis 6.2.4

image
image

当用户兑换了多个勋章后,用户id将会变得越来越长(特别是勋章图比较长条的时候),而目前版本并不支持选择性佩戴勋章。
望未来加入 “选择性佩戴兑换过的徽章” 功能。

数据库安装出错

The following tables will be created
torrent_tags
Error: ["Migrating: 2022_03_07_012545_create_tags_table",""," Illuminate\Database\QueryException",""," SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tags' already exists (SQL: create table tags (id bigint unsigned not null auto_increment primary key, name varchar(255) not null, color varchar(255) not null, priority int not null default '0', created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')",""," at D:\classic-demo\nexusphp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712"," 708\u2595 // If an exception occurs when attempting to run a query, we'll format the error"," 709\u2595 // message to include the bindings with SQL, which will make this exception a"," 710\u2595 // lot more helpful to the developer instead of just the database's errors."," 711\u2595 catch (Exception $e) {"," \u279c 712\u2595 throw new QueryException("," 713\u2595 $query, $this->prepareBindings($bindings), $e"," 714\u2595 );"," 715\u2595 }"," 716\u2595 }",""," 1 D:\classic-demo\nexusphp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:501"," PDOException::("SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'tags' already exists")",""," 2 D:\classic-demo\nexusphp\vendor\laravel\framework\src\Illuminate\Database\Connection.php:501"," PDOStatement::execute()"]

Snipaste_2022-03-17_10-14-19

IMDb no poster

IMG_20210714_224118
Can't parse poster for torrent from IMDb
Also got this error
pic/nophoto.gif"` failed (2: No such file or directory), client: 192.168.1.1, server: test.host, request: "GET /pic/nophoto.gif

NexusPHP v1.6.6 升级 v1.7.0 受阻 [Octane 相关]

目前该错误(Server Error 2)已在生产与测试环境复现。
按照文档:https://doc.nexusphp.org/update1.7.html 进行操作


前置

PHP已安装模块(文档中所需模块已安装)

[PHP Modules]
bcmath
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
redis
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
sqlite3
standard
swoole
sysvsem
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache

PHP所需解除禁用函数:已全部解除禁用


升级

已使用v1.7.0 release zip进行覆盖
已使用composer install进行组件安装
已使用update.php进行升级,升级模式选择为:manual/手动升级(本地文件覆盖)
升级后站点一切正常


配置 Octane 加速 (故障相关)

本环境使用 roadrunner
roadrunner已置于网站根目录,且赋予www用户运行的权限
Supervisor 已配置完成,且进程正常启动 (注:roadrunner 启动代码使用的ip是 127.0.0.1 而非文档中的 0.0.0.0)
image


配置 nginx 转发 (故障)

已按照文档进行相关反代的配置,并已重启nginx
image


重启 Nginx 后登录管理后台,看是否工作正常。如果正常,可以进一步配置下边的旧 announce 转发。

登录管理后台这一步,无法实现。相关错误为:
image

注:由于并不了解admin面板的log文件存储位置,目前无法确切定位错误原因。

对 `files` 表进行优化建议

在上传种子的时候,如果种子包含的文件数过多,会对 files 表产生大量 insert 操作,并在用户检索对应种子文件列表的时候,select 操作传输过多数据。此外, files 表中 filename 列在文件较深的情况下,会产生大量重复字段。

以上,建议对 files 表进行优化,直接在 files 表中存入树状结构的 json 文本,并在检索种子文件列表操作时直接返回数据库文本即可。实测能解决部分种子上传超时问题。


存入的 json 结构如下:

对于单文件种子:

{
    "torrentName": {   // 种子名
        "file1": 12345678   // 文件+大小
    }
}

对于多文件种子:

{
    "torrentName": {   // 种子名
        "Dir1": {   // 子文件夹
            "file1": 12345678,   //  文件+大小
        },
        "file2": 12345678,
        "file3": 12345678 
    }
}

此处提供部分 patch (因为完整的未形成展示性 pr )

  • 对 files 表结构进行修改(或另建一个表)
  • 文件 takeupload.php 进行修改
/** 前面需要把 $filelist 从 Array<Array<string,string>> 变成 Dict<string,string>

// 修改前 
$filelist[] = array($dname, $totallen);
$filelist[] = [$ffe, $ll];

// 修改后
$filelist[$dname] = $totallen;
$filelist[$ffe] = $ll;
*/

// after get torrent id

// 生成新的files表
function getFileTree($array, $delimiter = '/')
{
    if (!is_array($array)) {
        return [];
    }

    $splitRE = '/' . preg_quote($delimiter, '/') . '/';
    $returnArr = [];
    foreach ($array as $key => $val) {
        // Get parent parts and the current leaf
        $parts = preg_split($splitRE, $key, -1, PREG_SPLIT_NO_EMPTY);
        $leafPart = array_pop($parts);

        // Build parent structure
        // Might be slow for really deep and large structures
        $parentArr = &$returnArr;
        foreach ($parts as $part) {
            if (!isset($parentArr[$part])) {
                $parentArr[$part] = [];
            } elseif (!is_array($parentArr[$part])) {
                $parentArr[$part] = [];
            }
            $parentArr = &$parentArr[$part];
        }

        // Add the final part to the structure
        if (empty($parentArr[$leafPart])) {
            $parentArr[$leafPart] = $val;
        }
    }
    return $returnArr;
}

$fileTreeJson = getFileTree($filelist);
if ($type === "multi") {
    $fileTreeJson = [$dname => $fileTreeJson];
}

// then insert $fileTreeJson to database after json_encode
  • 前端 viewfilelist 优化,并提供折叠功能:
// 代码取自 OurBits /assets/js/common.js ,需要适配修改
function build_tree(tree,par = '') {
    let ret = '';
    for (let k in tree) {
        let v = tree[k];
        let dep = (par.match(/\//g) || []).length;
        if (typeof v == 'object') {
            ret += "<tr " +(par === "" ?  "" : "style='display:none' data-par = \"" + par + "\" ")+ "><td class='rowfollow' data-name='" + k + "'>" + "&ensp;".repeat(dep * 2) + "<a href='javascript: void(0);'><b>" + k +"</b></a></td>";
            ret += build_tree(v,par + "/" + k);
        } else {
            ret += "<tr " +(par === "" ?  "" : "style='display:none' data-par = \"" + par + "\" ")+"><td class=rowfollow data-name='" + k + "'>" + "&ensp;".repeat(dep * 2) + k + "</td><td class=rowfollow align='right' data-size='"+ v + "'>" + humanFileSize(v, 2) + "</td></tr>";
        }
    }
    return ret;
}

function viewfilelist(torrentid) {
    $.post('api.php', {'action': 'viewfiletree', 'tid': torrentid}, function (data) {
        if (data.success) {
            document.getElementById("showfl").style.display = 'none';
            document.getElementById("hidefl").style.display = 'block';
            var file_list = data.files;
            var file_list_html = "<table class=\"main\" border=\"1\" cellspacing=0 cellpadding=\"5\">";
            file_list_html += "<tr><td class=colhead>Path</td><td class=colhead align=center><img class=\"size\" src=\"../../pic/trans.gif\" alt=\"size\" /></td></tr>";
            file_list_html += build_tree(file_list);
            file_list_html += "</table>";
            document.getElementById("filelist").innerHTML = file_list_html;
            $('#filelist a').click(function () {
                let that = $(this);
                let parent = that.parents('tr:eq(0)');
                let par = parent.attr('data-par');
                let expand = (par ? par: "") + "/" + that.text();

                $('#filelist tr[data-par^="'+ expand +'/"]').hide();  // 首先隐藏所有对应子项
                $('#filelist tr[data-par$="'+ expand +'"]').toggle();  // 然后对当前项可见性进行切换
            })
        } else {
            alert(data.msg);
        }
    });
}
  • 提供平滑迁移功能(此处不做展示)

上传头像会报错.

Notice: Undefined index: public in /www/wwwroot/***/public/bitbucket-upload.php on line 57

QQ截图20210421030915.png

之前还在其他地方遇到,我当时太忙没截图,也忘记是哪个界面了,我回头再找找.

环境是Nginx 1.13.6.2 |PHP 7.3|

另外方便留个更加方便的联系方式不,比如QQ或者Telegram之类的!

在网站搭建第三步中出现了create tables的错误

这是网站提示:
The following tables will be created
faq, files, forummods, forums, friends, fun, funds, funvotes, invites, iplog, isp, language, links, locations, loginattempts, magic, media, messages, modpanel, news, offers, offervotes, overforums, peers, pmboxes, pollanswers, polls, posts, processings, prolinkclicks, readposts, regimages, reports, requests, resreq, rules, schools, searchbox_fields, searchbox, secondicons, settings, shoutbox, sitelog, snatched, sources, staffmessages, standards, stylesheets, subs, suggest, sysoppanel, teams, thanks, topics, torrent_secrets, torrents_custom_field_values, torrents_custom_fields, torrents_state, torrents, uploadspeed, user_ban_logs, users, hit_and_runs, bonus_logs, medals, user_medals, tags, torrent_tags

这是报错信息:

Error: ["Migrating: 2021_06_08_113437_create_failed_jobs_table","Migrated: 2021_06_08_113437_create_failed_jobs_table (2.04ms)","Migrating: 2021_06_08_113437_create_faq_table","Migrated: 2021_06_08_113437_create_faq_table (37.57ms)","Migrating: 2021_06_08_113437_create_files_table","Migrated: 2021_06_08_113437_create_files_table (46.99ms)","Migrating: 2021_06_08_113437_create_forummods_table","Migrated: 2021_06_08_113437_create_forummods_table (39.99ms)","Migrating: 2021_06_08_113437_create_forums_table","Migrated: 2021_06_08_113437_create_forums_table (22.76ms)","Migrating: 2021_06_08_113437_create_friends_table","Migrated: 2021_06_08_113437_create_friends_table (72.19ms)","Migrating: 2021_06_08_113437_create_fun_table","Migrated: 2021_06_08_113437_create_fun_table (27.82ms)","Migrating: 2021_06_08_113437_create_funds_table","Migrated: 2021_06_08_113437_create_funds_table (30.64ms)","Migrating: 2021_06_08_113437_create_funvotes_table","Migrated: 2021_06_08_113437_create_funvotes_table (64.16ms)","Migrating: 2021_06_08_113437_create_invites_table","Migrated: 2021_06_08_113437_create_invites_table (60.96ms)","Migrating: 2021_06_08_113437_create_iplog_table","Migrated: 2021_06_08_113437_create_iplog_table (53.86ms)","Migrating: 2021_06_08_113437_create_isp_table","Migrated: 2021_06_08_113437_create_isp_table (25.19ms)","Migrating: 2021_06_08_113437_create_language_table","Migrated: 2021_06_08_113437_create_language_table (22.97ms)","Migrating: 2021_06_08_113437_create_links_table","Migrated: 2021_06_08_113437_create_links_table (22.61ms)","Migrating: 2021_06_08_113437_create_locations_table","Migrated: 2021_06_08_113437_create_locations_table (24.89ms)","Migrating: 2021_06_08_113437_create_loginattempts_table","Migrated: 2021_06_08_113437_create_loginattempts_table (26.44ms)","Migrating: 2021_06_08_113437_create_magic_table","Migrated: 2021_06_08_113437_create_magic_table (69.25ms)","Migrating: 2021_06_08_113437_create_media_table","Migrated: 2021_06_08_113437_create_media_table (25.20ms)","Migrating: 2021_06_08_113437_create_messages_table","Migrated: 2021_06_08_113437_create_messages_table (63.24ms)","Migrating: 2021_06_08_113437_create_modpanel_table","Migrated: 2021_06_08_113437_create_modpanel_table (33.78ms)","Migrating: 2021_06_08_113437_create_news_table","Migrated: 2021_06_08_113437_create_news_table (88.31ms)","Migrating: 2021_06_08_113437_create_offers_table","Migrated: 2021_06_08_113437_create_offers_table (48.68ms)","Migrating: 2021_06_08_113437_create_offervotes_table","Migrated: 2021_06_08_113437_create_offervotes_table (46.35ms)","Migrating: 2021_06_08_113437_create_overforums_table","Migrated: 2021_06_08_113437_create_overforums_table (36.95ms)","Migrating: 2021_06_08_113437_create_peers_table","Migrated: 2021_06_08_113437_create_peers_table (74.48ms)","Migrating: 2021_06_08_113437_create_pmboxes_table","Migrated: 2021_06_08_113437_create_pmboxes_table (41.81ms)","Migrating: 2021_06_08_113437_create_pollanswers_table","Migrated: 2021_06_08_113437_create_pollanswers_table (91.93ms)","Migrating: 2021_06_08_113437_create_polls_table","Migrated: 2021_06_08_113437_create_polls_table (33.26ms)","Migrating: 2021_06_08_113437_create_posts_table","Migrated: 2021_06_08_113437_create_posts_table (276.02ms)","Migrating: 2021_06_08_113437_create_processings_table","Migrated: 2021_06_08_113437_create_processings_table (30.62ms)","Migrating: 2021_06_08_113437_create_prolinkclicks_table","Migrated: 2021_06_08_113437_create_prolinkclicks_table (23.19ms)","Migrating: 2021_06_08_113437_create_readposts_table","Migrated: 2021_06_08_113437_create_readposts_table (69.07ms)","Migrating: 2021_06_08_113437_create_regimages_table","Migrated: 2021_06_08_113437_create_regimages_table (23.95ms)","Migrating: 2021_06_08_113437_create_reports_table","Migrated: 2021_06_08_113437_create_reports_table (27.70ms)","Migrating: 2021_06_08_113437_create_requests_table","Migrated: 2021_06_08_113437_create_requests_table (73.13ms)","Migrating: 2021_06_08_113437_create_resreq_table","Migrated: 2021_06_08_113437_create_resreq_table (43.85ms)","Migrating: 2021_06_08_113437_create_rules_table","Migrated: 2021_06_08_113437_create_rules_table (23.76ms)","Migrating: 2021_06_08_113437_create_schools_table","Migrated: 2021_06_08_113437_create_schools_table (24.12ms)","Migrating: 2021_06_08_113437_create_searchbox_fields_table",""," Illuminate\Database\QueryException",""," SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table searchbox_fields add unique uniq_searchbox_type_id(searchbox_id, field_type, field_id))",""," at /www/wwwroot/nexusphp-1.6.0/vendor/laravel/framework/src/Illuminate/Database/Connection.php:712"," 708\u2595 // If an exception occurs when attempting to run a query, we'll format the error"," 709\u2595 // message to include the bindings with SQL, which will make this exception a"," 710\u2595 // lot more helpful to the developer instead of just the database's errors."," 711\u2595 catch (Exception $e) {"," \u279c 712\u2595 throw new QueryException("," 713\u2595 $query, $this->prepareBindings($bindings), $e"," 714\u2595 );"," 715\u2595 }"," 716\u2595 }",""," \u001b[2m+9 vendor frames \u001b[22m"," 10 /www/wwwroot/nexusphp-1.6.0/database/migrations/2021_06_08_113437_create_searchbox_fields_table.php:27"," Illuminate\Support\Facades\Facade::__callStatic()",""," \u001b[2m+21 vendor frames \u001b[22m"," 32 /www/wwwroot/nexusphp-1.6.0/artisan:37"," Illuminate\Foundation\Console\Kernel::handle()"]

请问是在哪出现了问题

Forum topic title bug " are treated wrongly

I have tried to enter this subject of the topic at /forums.php:
Chyba "Abc" - 123456

Topic was created.

Then i have clicked to edit topic, and seeing that it caused subject be reset to: Chyba on topic editing page.

Seems like a bug. Thank you

游客注册时无法查看 [Rules-站点规则] 与 [faq-常见问题]

问题/故障

image

nexusPHP注册时要求勾选确认阅读rules,以及查看faq。
但游客身份(未登录/未注册)无法查看rules以及faq,并返回:
image
并退回到登录界面。

寻求解决方案

请问 站点设定管理组面板 与是否有特殊设置允许guest查看rules和faq?我仔细确认了全部选项,皆没有涉及到这部分的设定。
或者说,只能通过 站点设定 -> 安全设定 -> 游客访问 -> 展示指定静态页/展示自定义内容 进行设定?
这种方法的弊端是无法使用多语言页面,且无法根据rules与faq内容修改而自动更新。

Problem beta 12 => beta 13 (peers table empty)

Hi,

I have made the update beta 12 => beta 13 and I have a big problem.
The "peers" table is now empty, do you have why and how to resolve it ?

I have a backup from my databases so I can restore it if needed.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.