WHMCS支付和提交工单提示mkdir(): 权限不够

本站正在使用的主机

本站目前托管于腾讯云香港轻量服务器,价格便宜访问速度也快,使用本站推荐链接购买还可免费获得WordPress运行环境优化服务。

最新活动 »

WHMCS网站可以正常访问,但一些页面操作时提示mkdir(): 权限不够,例如支付页面、提交工单页面等。

League\Flysystem\Exception: Impossible to create the root directory "/home/beizigen/htdocs/whmcs/downloads". mkdir(): 权限不够 in /home/honcode/htdocs/whmcs/vendor/league/flysystem/src/Adapter/Local.php:112
Stack trace:
#0 /home/honcode/htdocs/whmcs/vendor/league/flysystem/src/Adapter/Local.php(78): League\Flysystem\Adapter\Local->ensureDirectory('/home/beizigen/...')
#1 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/File/Provider/LocalStorageProvider.php(0): League\Flysystem\Adapter\Local->__construct('/home/beizigen/...')
#2 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/File/Configuration/FileAssetSetting.php(0): WHMCS\File\Provider\LocalStorageProvider->createFilesystemAdapterForAssetType('email_template_...', '')
#3 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/File/Storage.php(0): WHMCS\File\Configuration\FileAssetSetting->createFilesystemAdapter('')
#4 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/File/Storage.php(0): WHMCS\File\Storage->createFilesystem('email_template_...')
#5 /home/honcode/htdocs/whmcs/vendor/illuminate/support/Facades/Facade.php(261): WHMCS\File\Storage->emailTemplateAttachments()
#6 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/Mail/Message.php(0): Illuminate\Support\Facades\Facade::__callStatic('emailTemplateAt...', Array)
#7 /home/honcode/htdocs/whmcs/vendor/whmcs/whmcs-foundation/lib/Mail/Emailer.php(0): WHMCS\Mail\Message::createFromTemplate(Object(WHMCS\Mail\Template))
#8 /home/honcode/htdocs/whmcs/includes/functions.php(0): WHMCS\Mail\Emailer::factoryByTemplate(Object(WHMCS\Mail\Template), 1, Array)
#9 /home/honcode/htdocs/whmcs/includes/ticketfunctions.php(0): sendMessage('Support Ticket ...', 1, Array)
#10 /home/honcode/htdocs/whmcs/admin/supporttickets.php(0): AddReply(1, '', '', '\xE7\xAC\xAC\xE4\xB8\x89\xE4\xB8\xAA', 1, '', Array, 'Answered', false, false, true, Array)
#11 {main}

这种情况可能是换主机文件路径发生变化造成的,找到数据库表tblstorageconfigurations,修改其中的存储路径即可。

如果确定tblstorageconfigurations表中的存储路径不正确,可以使用以下SQL语句快速修改:

UPDATE `tblstorageconfigurations` SET `name`= REPLACE(`name`,'beizigen','honcode');
UPDATE `tblstorageconfigurations` SET `handler`= REPLACE(`handler`,'beizigen','honcode');
UPDATE `tblstorageconfigurations` SET `settings`= REPLACE(`settings`,'beizigen','honcode');

其中beizigen是旧路径,honcode是新路径,由于我的新路径与旧路径只有用户名不同,因此只替换用户名即可。

背字根微信二维码

本站文章均为原创,码字非常不容易,转载请注明原文出处,给苦逼的作者保留一点创作动力。