"Missing a temporary folder" when uploading file to course

"Missing a temporary folder" when uploading file to course

by Phil Raymond -
Number of replies: 12
Hi,

I've just installed v1.9.2+ on my computer. I've created a course and when I try to upload a file to the files folder, I get an error that says "Missing a temporary folder". The temp subdirectory is in my moodledata directory and all the permissions are 777.

A search reveals that nobody else has asked about this problem. Any ideas? It must be something simple.

Thanks very much,
Phil
Average of ratings: -
In reply to Phil Raymond

Solved: "Missing a temporary folder" when uploading file to course

by Phil Raymond -
Went into php.ini and entered the path to the temp folder here:

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = "/Applications/xampp/xamppfiles/temp"

Phil
In reply to Phil Raymond

Re: Solved: "Missing a temporary folder" when uploading file to course

by Kerry Connell -
I am having the same issue but don't understand your fix?? I cannot find a php.ini file on the host server (not where I can access anyway)? What directory is it in? I guess my path will be entirely different but I can work that out depending on where the file is?

Thanks Kerry

In reply to Kerry Connell

Re: Solved: "Missing a temporary folder" when uploading file to course

by Phil Raymond -
Hi Kerry,

I'm not sure if I can help. I'm not a developer, so I'm just figuring stuff out as I go. That particular solution was for a project on my own computer, so I have access to the php.ini file. I wasn't running into that issue when uploading to my live site, so I haven't had to deal with it there.

One thing I know that you can do is create your own php.ini file in a simple text editor like notepad and upload it to your site. We've done that for different problems and it's uploaded to about 6 different areas on our site, including in the moodle directory and in several subdirectories under that such as admin, auth, backup, blocks, and calendar. I think that's all.

So you could try making this file called php.ini with my solution in it:
upload_tmp_dir = "pathtoyourtempfolder"

Hope that helps. I'm off for the day, but I'll be around tomorrow.

Phil
In reply to Phil Raymond

Re: Solved: "Missing a temporary folder" when uploading file to course

by Kerry Connell -
Thanks Phil,

I am contacting my host provider to see what they can do for me.

Kerry
In reply to Phil Raymond

Re: Solved: "Missing a temporary folder" when uploading file to course

by Gaurav Bansal -
I created a new file php.ini in the root directory of moodle installation and added the following property to the file

upload_tmp_dir = "/tmp"

I am still getting the error message - Missing a temporary folder ; while trying to upload the file.

In reply to Gaurav Bansal

Re: Solved: "Missing a temporary folder" when uploading file to course

by Gaurav Bansal -
It was due to incorrect permisions on the temporary directory. It worked after I set the appropriate permissions to the directory.
In reply to Gaurav Bansal

Re: Solved: "Missing a temporary folder" when uploading file to course

by Sharyn Mayne -

Can you please tell me where the temporary directory is located ... I need to fix this issue and can't find a temporary directory.

Thanks

In reply to Sharyn Mayne

Re: Solved: "Missing a temporary folder" when uploading file to course

by Matt Hamon -

I am also having trouble with this, after reading the terse responses given to others also having the same problem I am none the wiser.

I know where my php.ini file is, and I know how to edit it but where is "/tmp" pointing too, the one in the php installation folder, the one in the wwwroot or the Moodle installation on my IIS or the one on C:\ drive. Also what sort of access level does IWAM and IUSR require to be able to upload files to Moodle. Would be nice if a someone whould be so kind as to post some clear instructions because without this feature Moodle is pretty limited.

Thanks in advanced.

In reply to Matt Hamon

Re: Solved: "Missing a temporary folder" when uploading file to course

by Geo Soc -

This still is not resolved?  All I think I need is where the private files are stored.  Then I can just ftp my backups and choose which one I want.  However, as simple as that seems I can't find even the backup file that I made with my new 2.03 Moodle.  Many hours wasted...

In reply to Phil Raymond

Re: "Missing a temporary folder" when uploading file to course

by Eduard Grootendorst -

I also received the message "Missing a temporary folder" after trying to upload a file. I restarted the computer and the message dissapeared.

I don't know much about this error, but I do know that since it's a temporary folder, you should probably just reset some stuff before uploading to the server. In my case I restarted the server and deleted the last activity I added. Then everything worked out.

I suspect that in my case I might have stopped an upload while it was busy. Which means that the upload wasn't a success.

In reply to Eduard Grootendorst

Re: "Missing a temporary folder" when uploading file to course

by Phi Phu -

This problem take place when your upload directory is too big, After deleted my temp folder this problem's been revolved

In reply to Phi Phu

Re: "Missing a temporary folder" when uploading file to course

by Owen Grubbs -

I got this "missing a temporary folder" today. It looks like my issue was with the php\sessions folder being too large. It had two years worth of files totaling over 60 gig. I deleted all files from the earliest year, freeing up about half the space. The upload worked after that. I hope that is the complete fix.

BTW, our platform is Windows and MSSQL server.  Moodle version 2.6.

Edit: Turns out, in my php.ini file, the upload_tmp_dir setting and the session.save_path setting both point to the php\sessions folder. So the "missing a temporary folder" message makes sense if that folder was maxxed out.