Chamilo big files upload fails on some cPanel
Recently I’ve had to fix a very strange cPanel installation of Chamilo. For some reason small files could be uploaded but not large files. Modifying the .htaccess file to add post_max_size and upload_max_filesize didn’t work.
The problem was due to two things, really:
- the re-configuration of php settings could only be done through local php.ini files (which only work for one directory, non-recursive, so you have to apply in several places)
- for some very strange reason, the upload_tmp_dir setting was undefined, which apparently didn’t work as I would have expected: it didn’t store temporary uploaded files in the /tmp directory of the server. I had to set this one manually (in a local php.ini file) to /home/myuser/public_html/www/chamilo/archive/ (feel free to put it somewhere else) to get it to work.
The resulting php.ini file looked like this:
post_max_size = 133M
upload_max_filesize = 133M
memory_limit = 256M
max_execution_time = 300
upload_tmp_dir = /home/myuser/public_html/chamilo/archive/
In the hope this helps somebody out there in the future…