Upload problem

Upload problem

- Pontus Sörlin の投稿
返信数: 5
Hi!
When trying to upload a file in Administration/Files, I get the following error: "A problem occurred while uploading 'C' (possibly it was too large)".

The file is just 24 kb, though. I tried to change read/write permissions on the C:/moodle folder, but that doesn't help.

My settings are:
$CFG->dbtype = "mysql";
$CFG->dbhost = "XXX.XX.XX.XX"; /my IP
$CFG->dbname = "moodle";
$CFG->dbuser = "XXXX";
$CFG->dbpass = "XXXXXXXXX";

$CFG->wwwroot = "http://XXX.XX.XX.XX/moodle";

$CFG->dirroot = "C:/Inetpub/wwwroot/moodle";

$CFG->dataroot = "C:/moodle";

$CFG->buggy_referer = false;

What could be wrong? I run win xp, IIS5.

I suspect it could have something to do with permissions to write on the C:/moodle folder?

/Pontus

Pontus Sörlin への返信

Re: Upload problem

- Martin Dougiamas の投稿
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers
Are you sure that your PHP server has file uploads enabled? (see your php.ini file) Also try uploading a new user image, and also a forum attachment ... do they work?
Martin Dougiamas への返信

Re: Upload problem

- Pontus Sörlin の投稿
This is from my php.ini
=============
; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir = C:PHPuploadtemp ; temporary directory for HTTP uploaded files (will use system default if not specified)

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M
================

It works to make a forum attachment, and that file is possible to download, there is a folder created called moddata in the moodle folder. The file is not recognized as the file it is, i.e. a Word document, it is an unknown file with a question mark. I can't access that file as a resource, because then it says: Warning: Invalid argument supplied for foreach() in C:Inetpubwwwrootmoodlelibweblib.php on line 261

When I tried to upload a new image though, it didn't work... It seemed to upload, but after reloading and emptying internet cache and reload there is but the smiley.
Pontus Sörlin への返信

Re: Upload problem

- Martin Dougiamas の投稿
画像 Core developers 画像 Documentation writers 画像 Moodle HQ 画像 Particularly helpful Moodlers 画像 Plugin developers 画像 Testers
When you upload the Word document, are you using standard extensions like .doc?

Hmm, wierd .. I think you'd better email me your URL and an admin account so I can take a look at it ...
Martin Dougiamas への返信

Re: Upload problem

- Pontus Sörlin の投稿
Word docs uploaded now show up as word files. But only as attachments to discussions...

All the above problems still remains.

Did it help you with the files I sent you?