Moodle Setup and Configuration
Installation
Settings
Regular Maintenance
Troubleshooting

Cannot upload files greater than 500KB 1).

Fix: If you upload a file that is bigger than 500k you can get back an error from your server.

Just adjusting the following php settings, it ignores it:

upload_max_filesize, post_max_size

I did a bit of searching on the net and found the following message on the PHP.net site and after setting some of his suggestions, I had no problem uploading bigger files.

FILE UPLOAD FROM FORM 2) A little note recording to save some users some time with: upload_max_filesize ignored, post_max_size ignored and memory_limit doesn't matter.

While troubleshooting a file upload issue with the IMP webmail system. I first looked to my php.ini and started adjusting these settings to no avail. My actual problem was a file httpd/conf.d/php.conf which contained:

SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288

The httpd/errorlog file showed:

  "Requested content-length of 2172475 is larger than the configured limit of 524288"

After adjusting the LimitRequestBody configuration directive there to 8000000, I was still unable to complete the attachment and send of a 2.4 meg zip file through the webmail system.

After a few hours of tweaking numbers and searching for more clues, I found the settings of

upload_max_filesize = 8000000
post_max_size = 8000000
memory_limit = 30000000
max_execution_time = 240

It worked to upload

Then the function from IMP which was timing out or memory_limiting out on my server:

chunk_split(base64_encode($contents))

Cut and Paste using Firefox

There are two ways of performing Cut and Paste in Moodle's editor:

  1. Simply use < Shift >< Ins > to paste.
  2. Configure the Firefox browser to handle Cut and Paste within editor. Modify prefs.js, or create user.js file in directory C:\Documents and Settings\<username>\Application Data\Mozilla\Firefox\Profiles\default.y3l
user_pref("capability.policy.allowclipboard.Clipboard.cutcopy", "AllAccess");
user_pref("capability.policy.allowclipboard.Clipboard.paste", "AllAccess");
user_pref("capability.policy.allowclipboard.sites", "http://moodle.org" "http://www.mysite.com");
user_pref("capability.policy.default.Clipboard.cutcopy", "AllAccess");
user_pref("capability.policy.default.Clipboard.paste", "AllAccess");
user_pref("capability.policy.policynames", "allowclipboard");
1)
Marcel Berteler. Moodle.org Forums: “General problems > Create file problem & upload problem”, Friday, 9 May 2003, 06:48 PM.
2)
greg at getnetez dot com, http://za.php.net/manual/en/configuration.directives.php, 11-Feb-2003 05:11.