open_basedir restrictions

open_basedir restrictions

by Matt S -
Number of replies: 1

Hi all,

I just moved my Moodle implementation over to a new server. I set everything up properly, but now I'm getting an open_basedir restriction when I click on the "Restore" link. My moodle data folder is cnmdata; it's located above the root of the web site and it's got 777 permissions. Here's the exact error message:

"Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/tidetechcnm.com/httpdocs/lib/moodlelib.php on line 1015

ERROR: Could not find or create a directory (/home/httpd/vhosts/tidetechcnm.com/cnmdata/2)(2)(2)


The site administrator needs to fix the file permissions

"

Does anybody know what this means?

Thanks!

Matt

Average of ratings: -
In reply to Matt S

Re: open_basedir restrictions

by Dick Davies -
Matt

What you seem to have is a variant on the "Moodle wont save files in safe mode" type of problem - addressed here: http://moodle.org/mod/forum/discuss.php?d=1374

Open_basedir is a more liberal version of safe mode - it opens up some folders for file writing - and you would need to know which folder(s) are available for writing and put your moodle data folder in there.

(The documentation seems unclear to me as to whether folders below the basedir are also open or need to be explicitly opened.)

For anyone with safe mode problems it might prove to be a compromise that your hosting co will permit.

Dick