Increase file upload size

There is an apparent default limit to file upload size set by php. Does anyone know if there is a way to increase the limit? I found the limit in Moodle, but it seems like it has to be fixed at the PHP level (maybe by modifying the php.ini file?).
Btw, I found that although the module listing in Rachel admin says that Moodle is v1.0, if you go into Moodle -> Server -> Environment it shows that the version is actually 3.1.6. That’s not the most current (3.7), but that’s way better than what I initially thought. :grin:

1 Like

Hi @jeremy, nobody replied to this. Perhaps you can find how to do this? :sob:

Hi @Brian_Stanton – alas, I am no more equipped to figure this one out than you are :slight_smile: – I have anecdotally heard that PHP uploads become unstable above a certain size, but I don’t know more than what you’ve discovered.

@Brian_Stanton I’m not sure exactly with the RACHEL-Plus ( I don’t have one ) but if you’re going to try this yourself, the php.ini file contains the upload_max_filesize and post_max_size settings. If you want to increase these in megabytes you set it to M

upload_max_filesize = 800M
post_max_size = 800M

and with gigabytes

upload_max_filesize = 2G
post_max_size = 2G

If you can log in with SSH you can use nano to edit the file. To find the php.ini you will have to do

cd /etc/php
ls   ( look for the version folder in the list. Let's say it's 5.4 )
cd 5.4
cd lighttpd

You should now see the php.ini and you’re at /etc/php/VERSIONHERE/lighttpd/ now edit it with

sudo nano php.ini

scroll down with the down key until you see upload_max_filesize or post_max_size. They should be near each other. Delete the existing value and enter 2G or something higher like 10G for each. To save press the following keys to save the changes and then reboot


Keep in mind this is unofficial advice from me but it has worked for me with the RACHEL-Pi in the past. @jeremy is right that increasing the file size becomes unstable after a certain size. I think the larger the file is the longer the transfer takes and this might conflict with how long a PHP session is set to last so the transfer might fail if it takes too long. I would look at using WinSCP if you’re transferring large files yourself and don’t need this available to the users.



Thanks @jamesk that’s extremely helpful. I will give it a try. I don’t want to move huge files, but some video files are well above the 8mb default limit, more like 30-40mb, so I really will need it. To explain further, yes I know how to move files onto Rachel using ftp and there are no size limits, but if you are creating Moodle lessons (which I am attempting) I began to realize that if you want to make it possible at some future date to backup and restore that lesson you will need to upload those videos via Moodle’s interface which is limited by the php limit. Moodle can also just create pointers to URL’s you specify on Rachel, but that will render the lesson unportable. I want to find a way to make the lesson portable and reproducible on other Rachels or any other server environment with a Moodle install.

1 Like

Hi @jeremy, I guess I will need to ‘void my warrantee’ and pester you for the pw to ssh into rachel, if you don’t mind. I really need to increase that upload limit. I’ll try my best not to brick it! :scream:

sent via private message @Brian_Stanton

1 Like

That did the trick nicely @jeremy. Thanks! :grinning:

Hi @jamesk, that worked perfectly. Thanks so much for the advice. For those that have newer versions of Rachel, please note minor change to @jamesk instructions: you will find Version 7.0 and inside the 7.0 folder the ligthtpd folder is not there. Instead look in the fpm folder to find the php.ini file.

1 Like

You’re welcome @Brian_Stanton. Glad to hear it worked and thanks for the file path tip for anyone that comes across this.

Hi @Brian_Stanton,

I’m looking at implementing Moodle on the RACHEL-Pi and I’m wondering what you needed to set your max file upload size to so you could move your lessons around. I figure what you were doing is a real world example of what might be necessary. Thanks.


1 Like