Moodle $CFG->dataroot 未正确配置 [英] moodle $CFG->dataroot is not configured properly

查看:65
本文介绍了Moodle $CFG->dataroot 未正确配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这基本上就是问题所在,我读到文件夹必须在公共 html 之外,这可能是权限,但我尝试了它们,但仍然无法解决它,还有什么可以解决的?

that is basically the problem, I read that the folder must be outside the public html and it could be the permision, but i tried both of them and I still could not solve it, what more could it be?

问题出现前我做了两件事,

I did 2 things before the problem started,

  1. 创建了一个名为 master 的子域
  2. 在 public_html 中使用 git pull 来更新网站

我之前也用同样的方式更新过,从来没有出现过这个问题,我没有重写任何东西,因为日志没有显示与moodle相关的任何内容,或者moodle的数据文件夹.

I have updated the same way before and this problem had never happened, I didn't rewrite anything because the log doesn't show anything related with the moodle, or the data folder of the moodle.

推荐答案

Moodle 使用数据文件夹来存储用户上传的文档或图片文件等内容,最好在您的 Web 主机文件夹之外创建此文件夹.

The Moodle use a data folder to store content such as document or picture files uploaded by users, it's best create this folder outside of your web host folder.

安装 Moodle 后,它会在 Moodle 安装文件夹中创建 config.php 文件,您有:

After the Moodle installation it's created the config.php file in the Moodle installation folder, there you have:

$CFG->dataroot  = 'data folder location'; 

您可以尝试手动设置数据文件夹路径,如果config.php文件不存在可能您没有权限在服务器磁盘/文件夹上写入文件.

You can try setup the data folder path manually, if the config.php file doesn't exist maybe you don't have permission to write files on the server disk/folder.

这篇关于Moodle $CFG->dataroot 未正确配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆