Could not find or create directory

Could not find or create directory

by Phil Marsh -
Number of replies: 3

Hi....

I've finally got through the installation with help information on this forum.... but I can't seem to solve this,

ERROR: Could not find or create a directory (D:\Webspace\nohighway.com\wwwroot\moodledata /cache)

ERROR: Could not find or create a directory (D:\Webspace\nohighway.com\wwwroot\moodledata /sessions)

PHP Warning: mkdir(D:\Webspace\nohighway.com\wwwroot\moodledata /cache): No such file or directory in D:\Webspace\nohighway.com\wwwroot\moodle\lib\moodlelib.php on line 1975 PHP Warning: mkdir(D:\Webspace\nohighway.com\wwwroot\moodledata /sessions): No such file or directory in D:\Webspace\nohighway.com\wwwroot\moodle\lib\moodlelib.php on line 1975 PHP Warning: Unknown(): open(D:\Webspace\nohighway.com\wwwroot\moodledata /sessions\sess_ba33d39f4793803f8add1eaa3a39e024, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (D:\Webspace\nohighway.com\wwwroot\moodledata /sessions) in Unknown on line 0

it appears after everything seems to have installed correctly. I originally had the moodledata folder above the wwwroot but that gave the same error message.

Any ideas?

Thanks in advance

Phil

Average of ratings: -
In reply to Phil Marsh

Re: Could not find or create directory

by Shane Elliott -
Picture of Core developers Picture of Plugin developers
1. Check that there isn't a space at the end of your dataroot config string; ie you should not have
$CFG->dataroot = 'D:\Webspace\nohighway.com\wwwroot\moodledata ';
... should be ...
$CFG->dataroot = 'D:\Webspace\nohighway.com\wwwroot\moodledata';
2. The windows web server is not translating the forward slashes into backslashes properly. Someone with a bit more moodle windows experience may be able to help here.

In reply to Shane Elliott

Re: Could not find or create directory

by Phil Marsh -

Thanks Shane,

That seems to have solved it .......... brilliant!

Phil

In reply to Phil Marsh

Re: Could not find or create directory

by Mark Mead -
I am very familiar with this problem:

ERROR: Could not find or create a directory (/home/edusonl/public_html/moodle/uploaddata/11)

It has been with me since I started using Moodle. I had a friend help me work out this same problem in the config.php file about two years ago when I first got started. Things worked fine, even when I upgraded to a newer Moodle version. At least, everything seemed ok.

However, I restored my courses from the old site to the new site with the new Moodle. The old files have moddata files but the new classes do not have these files. I have tried to manually create them but I no longer have administrative permission.

How can I create these new moddata files? I am instructed to change the Admin permissions, but I feel like I've tried everything within the course settings.

Should I be working with Administrative settings or config.php?

I am not very expert at PHP, but I am willing to keep plugging away at this problem till I understand it.

Thanks
Mark