Moodle 2.0 install -cannot upload files

Moodle 2.0 install -cannot upload files

by Mary Cooch -
Number of replies: 27
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Hi there. This is possibly an installation issue but not sure so if it should be moved please someone move it. I asked our network manager to install Moodle 2.0 on our network which he just did but when I try to upload a file (in the file picker:: upload file) I get this message

Can not read file, either file does not exist or there are permission problems which suggests -er - there are permission problems. This is an area I'm lost in so if anyone knowledgeable about Moodle 2 install could suggest something I can then pass it onto him.
I am told our set up is : Server 2003 R2 running IIS 6.0
Average of ratings: -
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Can you network manager check that the IUSR_<SERVER NAME> account has full control over the moodledata folder?
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I'll email him now and get back to you!

In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Ok..well he says it does now - but I still get the same error messagesad

What with this and not being able to see properly externally hosted Moodle 2.0s I'm becoming a bit overmoodled at the moment...sad

In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Trevor Johnson -

Have the same issue here...

Server 2003 R2 running IIS 6.0 also.

IIS User has Modify permissions for MoodleData.

Cheers

Trevor

In reply to Trevor Johnson

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Oh this is worryingsad Nobody has any ideas? We have Moodle 1.9 working absolutely fine...
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
To be honest Mary, I haven't tried installing Moodle on Windows in a long time, and certainly not Moodle 2... Might be worth asking this over on the Windows forum to see if anyone there has any clues.

Setting the IUSR<server name> to have modify rights to the folder was certainly the way to do it for Moodle 1.9....
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Colin Fraser -
Picture of Documentation writers Picture of Testers
mm I have tried to import into a Windows install and have either
a) not realized there is a different import routine so got it wrong, or
b) thought the functionality to import has not been added, yet.
If
a) then it is not that intuitive,
or if
b) at this late stage, did someone forget something in the build I have installed?

Of course, this does not negate the possibility that I am
a) tied up on so many other issues at the moment that I am not really paying attention to Moodle 2.0.
or
b) actually thick as a brick and just getting it wrong,

There is no vote line here so please, do not look for one..big grinbig grin

In reply to Colin Fraser

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hmmm... well, thanks for your support; put it on hold at the moment to concentrate on the end of term but it is a worry - I mean as I said - 1.9 works fine
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK... Not quite the same environment as you; but near as damn it!

I have a virtual XP SP3 machine here at home, so I have installed IIS 5.1, MySQL 5.1 and PHP 5.2 on it and just downloaded the latest Moodle 2 standard release....

And am now trying a standard install...

I will let you know how it goes!

Jon
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
bet it works!!! (which will be no help to me at  all! big grinbig grin)
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Well I have it installed but it took some mucking about!

For some reason I kept getting session start errors until I added the debugging lines into my config.php; then it let me install without any errors!!! Very strange!

Anyway; on with the test in hand...
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Umm OK.. So I get an error too!

"ERROR: Invalid JSON string

Warning: filesize() [function.filesize]: stat failed for C:\WINDOWS\Temp\php66.tmp in C:\Inetpub\wwwroot\moodle\repository\upload\lib.php on line 94
{"error":"Can not read file, either file does not exist or there are permission problems","stacktrace":null,"debuginfo":null}"

So... it is a permissions issue...

I am going to try adding IUSR_<MACHINE_NAME> account with modify rights to C:\WINDOWS\Temp and see if that helps...

Jon
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
YEAH big grin

That fixed it!!!

Your network admin needs to make sure that which ever folder he has defined as the Temp folder in the php.ini; the IUSR_<MACHINE_NAME> account has modify rights over it too.

Oh yeah; and on a windows server make sure you have turned off slash arguments in Site Administration > server > HTTP too, or you won't see any of your uploaded files either.

HTH

Jon
Average of ratings: Useful (1)
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Aha! Well -I just passed on your message and will let you know!!!
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Well- I am in London at Mahara UK 2010 so can't check for real (as it's an internal install) but just got an email from network manager saying it seems to be working now - so - thanks!!!
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
No worries Mary - glad to be of some help wink

Is there anyway the server environment check page in Moodle 2 could be made to perform a check on the status of the permissions to the PHP temp folder?

I am presuming that it is the change in the file uploads in version 2 that require access to the PHP temp folder when uploading files in Moodle (I am sure I never used to have to make that permission change on a Windows system... thoughtful). If so it would be nice to warn people some how if there file system is not set up right.

Jon
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
OK; I have added a note to this doc page PHP_settings_by_Moodle_version#PHP_Settings about this requirement.

Once Moodle 2 is out I will revisit the page and try to tidy it up a bit.

Jon
In reply to Jon Witts

Re: Moodle 2.0 install -cannot upload files

by Tom the Teacher -
I'm still finding this to be the case even today's latest release for Windows (Sept 12, 2010). Although I understand what you have done to correct this and have done the same, I still have problems. I'm hoping you can point me in the right direction.

I use Windows 7 x64 Ultimate. Everything runs smoothly with my XAMPP setup. I've given permissions for all users on the computer to access the following:

C:\wwwroot\xampp\moodledata
C:\Windows\Temp

I can't help but wonder if this is a config.php file problem. I'm missing something simple but I can't seem to figure it out.

Would be great if another Windows 7 user or anyone with an idea could lend a hand here. I'm kinda stuck in the water without the ability to add files.
Many thanks.


In reply to Tom the Teacher

Re: Moodle 2.0 install -cannot upload files

by Tom the Teacher -
Ok I solved it. I basically needed to add permissions for IUSR (which isn't a default possability). I browsed saw it, added it , gave it permissions and still didn't work until I realized...Windows/Temp directory was checked as read only. I restarted everything, cleared cache and it worked.
In reply to Tom the Teacher

Re: Moodle 2.0 install -cannot upload files

by Tom the Teacher -
was working..even uploaded a .swf but now nothing. I'm so frustrated. Any have any idea what I need to do to make this work?
In reply to Tom the Teacher

Re: Moodle 2.0 install -cannot upload files

by Tom the Teacher -
turns out it's a browser issue. Firefox and chrome work fine but IE and Opera won't allow it.
In reply to Tom the Teacher

Re: Moodle 2.0 install -cannot upload files

by Olaf Nöhring -

Hi yep, same here with Moodle 2.0.2+ installed: I can not upload from Opera browser - but FireFox works.

Is there a fix by now?

Olaf

In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Mr. Marc -
I'm installing on CentOS 5.x and have gotten past the errors of php and mysql version, but can seem to get past the errors and warnings on the admin/install.php page.

php_extension dom
php_extension mbstring
php_extension soap
php_extension gd
php_extension intl

I try to click on the reference page but there is not any information yet been posted?

php 5.2
mysql 5.3
In reply to Mr. Marc

Re: Moodle 2.0 install -cannot upload files

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
These are the required PHP Extensions for Moodle 2. You need to install/compile PHP with these extensions. Being a Debian / Ubuntu man I am not too sure how you would do this on a CentOS box... Do you use yum for your package management?

Jon
In reply to Mary Cooch

Re: Moodle 2.0 install -cannot upload files

by Alex Pearce -

I noticed that the issues on this forum post are all related to permissions. If go through this whitepaper I have done on installing Moodle 2 on Windows Server with IIS it will tell you the changes you need in php.ini and the permission to the folders.

http://www.bfcnetworks.com/whitepapers/installing-moodle-2-on-windows-server-mysql-php-and-iis7/

In reply to Alex Pearce

Re: Moodle 2.0 install -cannot upload files

by Carl Ervin -

I have followed all of your permissions entries in your whitepaper, but I still can not upload a file to my moodle install.  I'm using Windows Server 2008, IIS 7, and MySQL for my install.  Any help would be greatly appreciated.

In reply to Carl Ervin

Re: Moodle 2.0 install -cannot upload files

by Carl Ervin -

Does anyone know WHERE the files are actually uploaded to?  I used the white paper listed above to create a "sessions" folder in the C:\PHP folder and gave the folder the IUSR permissions of Full Control, but I still get the error.  I made all of the changes in the php.ini file and restarted IIS as directed.

It looks like when I try to create a folder in Moodle that it creats the folder, in Files, but I can't find the folder that I create either.  It is like it creats it, but it doesn't really create it.