xcode75 / XManagerPlus

An Xray Manager
https://xcode75.github.io/XMPlusDocs/
255 stars 47 forks source link

[BUG] Server used stats are not resetting #305

Closed amihos closed 8 months ago

amihos commented 9 months ago

Environment

OS: cenOs stream 9 x86_64

PHP version: 7.4

DB version: 5.7.43

Panel Version: 20230909

I noticed the server used reset function is not happening (i set it to 7 days). I tried to run php xmplus reset_used ( i guessed this must be the function in charge of resetting the server used stats)

Debug Info: enable debug in config.php and upload screenshot. Web capture_19-9-2023_9434_goserver website

Whoops\Exception\ErrorException thrown with message "Trying to get property 'symbol_left' of non-object"

Stacktrace:

36 Whoops\Exception\ErrorException in /www/wwwroot/shop.huso.ml/storage/smarty/compile/1162fe190c063369a9880ea9d30570dfb84d6813_0.file.stats.tpl.php:34

35 Whoops\Run:handleError in /www/wwwroot/shop.huso.ml/storage/smarty/compile/1162fe190c063369a9880ea9d30570dfb84d6813_0.file.stats.tpl.php:34

34 content_6509526a6ae4d5_06777644 in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123

33 Smarty_Template_Resource_Base:getRenderedTemplateCode in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114

32 Smarty_Template_Compiled:render in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:217

31 Smarty_Internal_Template:render in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:386

30 Smarty_Internal_Template:_subTemplateRender in /www/wwwroot/shop.huso.ml/storage/smarty/compile/1829547ee551913ad090b0a754cb46535f8917bc_0.file.dashboard.tpl.php:45

29 content_6509526a6546e3_28274495 in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php:123

28 Smarty_Template_Resource_Base:getRenderedTemplateCode in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php:114

27 Smarty_Template_Compiled:render in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:217

26 Smarty_Internal_Template:render in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:238

25 Smarty_Internal_TemplateBase:_execute in /www/wwwroot/shop.huso.ml/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116

24 Smarty_Internal_TemplateBase:fetch in /www/wwwroot/shop.huso.ml/app/Http/Controllers/Admin/AdminController.php:0

23 App\Http\Controllers\Admin\AdminController:index in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php:38

22 Slim\Handlers\Strategies\RequestResponse:__invoke in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Routing/Route.php:358

21 Slim\Routing\Route:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:65

20 Slim\MiddlewareDispatcher:handle in /www/wwwroot/shop.huso.ml/app/Http/Middleware/Admin.php:35

19 App\Http\Middleware\Admin:__invoke in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:269

18 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:250$aae2405:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:65

17 Slim\MiddlewareDispatcher:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Routing/Route.php:315

16 Slim\Routing\Route:run in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Routing/RouteRunner.php:68

15 Slim\Routing\RouteRunner:handle in /www/wwwroot/shop.huso.ml/vendor/bryanjhv/slim-session/src/Slim/Middleware/Session.php:82

14 Slim\Middleware\Session:__invoke in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:269

13 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:250$aae2405:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Middleware/BodyParsingMiddleware.php:64

12 Slim\Middleware\BodyParsingMiddleware:process in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:121

11 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:108$aae2403:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php:45

10 Slim\Middleware\RoutingMiddleware:process in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:121

9 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:108$aae2403:handle in /www/wwwroot/shop.huso.ml/vendor/selective/basepath/src/BasePathMiddleware.php:52

8 Selective\BasePath\BasePathMiddleware:process in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:168

7 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:138$aae2404:handle in /www/wwwroot/shop.huso.ml/vendor/middlewares/whoops/src/Whoops.php:104

6 Middlewares\Whoops:process in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:121

5 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:108$aae2403:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php:76

4 Slim\Middleware\ErrorMiddleware:process in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:121

3 class@anonymous�/www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:108$aae2403:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/MiddlewareDispatcher.php:65

2 Slim\MiddlewareDispatcher:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/App.php:199

1 Slim\App:handle in /www/wwwroot/shop.huso.ml/vendor/slim/slim/Slim/App.php:183

0 Slim\App:run in /www/wwwroot/shop.huso.ml/public/index.php:31

Bug Info

I noticed the server used reset function is not happening. I tried to run php xmplus reset_used ( i guessed this must be the function in charge of resetting the server used stats) but got the below error messages:

php xmplus reset_used PHP Fatal error: Uncaught Error: Class 'App\Jobs\UserStatsJob' not found in /www/wwwroot/mydomain/app/Console/Commands/ResetUsedCommand.php:22 Stack trace:

0 /www/wwwroot/mydomain/vendor/symfony/console/Command/Command.php(298): App\Console\Commands\ResetUsedCommand->execute()

1 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()

2 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()

3 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()

4 /www/wwwroot/mydomain/xmplus(8): Symfony\Component\Console\Application->run()

5 {main}

thrown in /www/wwwroot/mydomain/app/Console/Commands/ResetUsedCommand.php on line 22

Fatal error: Uncaught Error: Class 'App\Jobs\UserStatsJob' not found in /www/wwwroot/mydomain/app/Console/Commands/ResetUsedCommand.php:22 Stack trace:

0 /www/wwwroot/mydomain/vendor/symfony/console/Command/Command.php(298): App\Console\Commands\ResetUsedCommand->execute()

1 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()

2 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()

3 /www/wwwroot/mydomain/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()

4 /www/wwwroot/mydomain/xmplus(8): Symfony\Component\Console\Application->run()

5 {main}

thrown in /www/wwwroot/mydomain/app/Console/Commands/ResetUsedCommand.php on line 22 [root@localhost mydomain]#

xcode75 commented 8 months ago

you should update the database