Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用户面板500报错 #943

Closed
doudou9418 opened this issue Mar 2, 2020 · 2 comments
Closed

用户面板500报错 #943

doudou9418 opened this issue Mar 2, 2020 · 2 comments

Comments

@doudou9418
Copy link

doudou9418 commented Mar 2, 2020

请将 [ ] 替换为 [x] 。Please relpace [ ] with [x] .

  • [ x] 我已知晓并同意,如果我不遵循以下格式提交 issue,或者我使用的并非最新版本的 SSPanel UIM,或者我没有提供足够的信息,或者我没有选中这些框,则我的 issue 将会被无条件关闭和锁定。 I acknowledge if I don't follow the format below, or I'm on an old commit, or I fail to provide sufficient information, or I don't check these box, my issue could be closed without any notice.
  • [ x] 我已确认我已经阅读过使用文档、Wiki,并在 issue 列表中查找相似的问题。I certify that I have read project Wiki and other issue may related to this one.
  • [x ] 我已知晓并同意,如果我不同意上述条件却仍然提交 issue,或即使同意上述条件但在提交 issue 时不按照条件执行,我的 issue 可被 SSPanel UIM 维护团队视为 spam、并在必要时会被举报到 GitHub。 I acknowledge if I disagree with the conditions above but still submit a issue, or if I agree conditions above but do not follow them when submitting a issue, my issue could be considered as spam by the SSPanel UIM maintenance team, and might be reported to GitHub if necessary.

Environment 环境
Your OS info, PHP/MySQL version and so on... 你的操作系统信息、PHP/MySQL 版本、以及其它所有可能相关的信息。
CentOS 7.6 Nginx 1.17.8 PHP 7.3
Commit
The commit you on. 你当前的 SSPanel UIM 位于哪条 commit。
commit 57ac930
Bug
The bug information. 请描述你遇到的 Bug。
面板安装过程中并无报错,打开站点之后遇到500问题,下面贴出debug内容,google了很多能力有限没找到解决方法,所以才来发issue打扰各位,抱歉
debug内容如下:
SmartyException thrown with message "Unable to load template 'file:500.tpl'"

Stacktrace:
#19 SmartyException in /www/wwwroot/1/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:195
#18 Smarty_Internal_Template:render in /www/wwwroot/1/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:232
#17 Smarty_Internal_TemplateBase:_execute in /www/wwwroot/1/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php:116
#16 Smarty_Internal_TemplateBase:fetch in /www/wwwroot/1/app/Controllers/HomeController.php:171
#15 App\Controllers\HomeController:page500 in /www/wwwroot/1/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php:40
#14 call_user_func in /www/wwwroot/1/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php:40
#13 Slim\Handlers\Strategies\RequestResponse:__invoke in /www/wwwroot/1/vendor/slim/slim/Slim/Route.php:281
#12 Slim\Route:__invoke in /www/wwwroot/1/vendor/slim/slim/Slim/MiddlewareAwareTrait.php:117
#11 Slim\Route:callMiddlewareStack in /www/wwwroot/1vendor/slim/slim/Slim/Route.php:268
#10 Slim\Route:run in /www/wwwroot/1/vendor/slim/slim/Slim/App.php:503
#9 Slim\App:__invoke in /www/wwwroot/1/vendor/zeuxisoo/slim-whoops/src/Zeuxisoo/Whoops/Provider/Slim/WhoopsMiddleware.php:70
#8 Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware:__invoke in /www/wwwroot/1/vendor/slim/slim/Slim/DeferredCallable.php:57
#7 call_user_func_array in /www/wwwroot/1/vendor/slim/slim/Slim/DeferredCallable.php:57
#6 Slim\DeferredCallable:__invoke in /www/wwwroot/1vendor/slim/slim/Slim/MiddlewareAwareTrait.php:70
#5 call_user_func in /www/wwwroot/1/vendor/slim/slim/Slim/MiddlewareAwareTrait.php:70
#4 Slim\App:Slim{closure} in /www/wwwroot/1/vendor/slim/slim/Slim/MiddlewareAwareTrait.php:117
#3 Slim\App:callMiddlewareStack in /www/wwwroot/1/vendor/slim/slim/Slim/App.php:392
#2 Slim\App:process in /www/wwwroot/1/vendor/slim/slim/Slim/App.php:297
#1 Slim\App:run in /www/wwwroot/1/config/routes.php:430
#0 require in /www/wwwroot/1/public/index.php:11
站点文件夹该给的权限都给了
Reproduce
Steps to reproduce the bug. 请逐步描述如何复现 Bug。

Expected behavior
What you expected to happen. 请描述你预期的行为。

Logs
If applicable, add your PHP logs here. 如果需要,请在这里粘贴 PHP Log。

Addition
Additional context here. 如有可能,请提供更多相关资料。

@doudou9418
Copy link
Author

已自行解决,smarty的路径问题,修改/www/wwwroot/sspanel/app/Services/Viwer.php中29行为 $smarty->settemplatedir(BASE_PATH . '/resources/views/' .Config::get('theme'). '/'); //设置模板文件存放目录即可解决,感谢google,感谢csdn

@kjwlegend
Copy link

我用了楼上的方法也没解决。 最后直接把地址改成静态了。 (反正也没有第二个 theme ... 狗头)

settemplatedir(BASE_PATH . '/resources/views/tabler');

然后成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants