Upload problem

Upload problem

Pontus Sörlin發表於
Number of replies: 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

評比平均分數: -
In reply to 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?
In reply to 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.
In reply to Pontus Sörlin

Re: Upload problem

Pontus Sörlin發表於
I could add that I'm also running phpcollab on the same server. Phpcollab is also using mysql. In phpcollab I can upload files with no problem to the same server.
In reply to 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 ...
In reply to 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?