xiaomlove / nexusphp

A private tracker application base on NexusPHP
https://nexusphp.org
GNU General Public License v2.0
892 stars 180 forks source link

[problem]automatic class vip demotion #86

Closed Stargaterom closed 2 years ago

Stargaterom commented 2 years ago

Hello @xiaomlove ,

I realized that when you grade a vip with an end date https://prnt.sc/6C8u3G7IHNRE

or when members go through the mybonus page the system does not demote them automatically so this task is not taken into account with the cleanup.

when I have a date and the bonus is yes, my arrival at the date and time does not demote the members automatically.

thank you for your understanding if you can do anything you would be super nice

xiaomlove commented 2 years ago

cleanup will remove VIP status if time's up, seed here

Stargaterom commented 2 years ago

hello @xiaomlove

yes indeed I saw this instruction in the cleanup, my it does not work correctly!! the vip member when he reaches the end date his status does not change class and remains vip on and forced to do it manually can you look please.

I can give you a test in image capture and wait for the end date and time and come back to you to show you that the member and remain vip despite the end indicate pass.

https://prnt.sc/0dPFYC5j_2IS

here I pass the test member in vip with the bonus and end time by the member panel (userdetails.php)and not by the my bonus page.

when I set this option and register it would be good if possible to add a function for the member to pass automatic vip .

https://prnt.sc/Gp85UpsgWDWm

1) I have the vip class in manual . 2) add yes on VIP by bonus. 3) add an end date so VIP until 4) save my changes.

here is what the page gives me after that!!!

https://prnt.sc/oJ-OTPFCe4YA = we can see that the system has added a text notifying us that the member and vip has a defined date

https://prnt.sc/HO3to49AkRNR

my on this date defined it will remain blocked and no demotion will be carried out.

thank you for your understanding the end date and for tomorrow at 10:30 a.m. French time

xiaomlove commented 2 years ago

There will be a delay in clearing the task, the time is not very accurate, the function should be fine.

xiaomlove commented 2 years ago

Make sure background cronjob runs well

Stargaterom commented 2 years ago

re @xiaomlove actually hadn't done this manipulation my I don't understand what the root-path is I know super root user do you have to modify the stars on the 2 lines on the crontab in etc/crontab?

I don't have a php-user so I don't think his lines will be functional

the time zone of the server and of the site is set in the same way so in logic if the crontab does its job the automatic cleanup will be done correctly my the root-path leaves me perplexed because I do not understand at all what its thank you if you can clarify on cordially

xiaomlove commented 2 years ago

My goodness, the backend tasks are an essential part of the site and the site does not run properly without it. See the documentation!

Stargaterom commented 2 years ago

thanks for info i understood that root-path was the path up to in the folder or site and install.

can you use root as user for the crontab

here after running the syslog command cat /var/log/syslog it displays the 2 lines in cron without error, it generates the log files in /tmp so I guess the command works.

https://prnt.sc/_kzegAIV-eaR

i have all full beautiful line that display and constantly update.

xiaomlove commented 2 years ago

The documentation clearly states that it must be the same user as the one running php, otherwise the logs will not be writable and errors will occur

Stargaterom commented 2 years ago

ok so it must be www-data and not in root I will then change the crontab thank you very much friends

Stargaterom commented 2 years ago

here is the syslog output

Jul 23 21:50:01 sr CRON[58794]: (www-data) CMD (cd /xxxx/xxxxxxxx/xxxxx.xx && php include/cleanup_cli.php >> /tmp/cleanup_cli_DOMAIN.log) Jul 23 21:50:01 sr CRON[58795]: (www-data) CMD (cd /xxxx/xxxxxxxx/xxxxx.xx && php artisan schedule:run >> /tmp/schedule_DOMAIN.log)

no mistake actually as you say you have to follow the indications its not simple as you and a beginner

xiaomlove commented 2 years ago

Everythis is OK, close it

Stargaterom commented 2 years ago

thank you @xiaomlove , my vip test and a success with the crontab its ok the vip its automatically demoted