Joomlatools Support Center

Increasing max file upload size when the base php.ini cannot be altered

Hey,

So my goal here is to allow users to upload files up to ~125MB or so. However due to the hosting environment I am unable to directly edit the php.ini file that Joomla references (/usr/local/lib/php.ini). I've done some research to find a solution and it seems to indicate it is possible to create a copy of the php.ini, edit the values you need to, and place it next to the script performing the action and the php.ini in the directory with it will be prioritized. I've also attempted changing the values through the .htaccess file with no luck. Places I've attempted to put the file:
Root of the file structure

/public_html/

/public_html/components/

/public_html/components/com_docman

As well /modules/com_docman and assorted subdirectories of them such as controller. I haven't been able to figure out where the upload script is.

The values currently held in the php.ini file are:

upload_max_filesize = 50M

post_max_size = 8M

memory_limit = 128M

max_execution_time = 30

max_input_time = 60

The error I receive on attempted 15MB upload is: Error: 401 - Csrf Token Not Found

Can you tell me where I could find the script in question? Any suggestions for what I could attempt to do to allow this are greatly appreciated. Thanks

Answer

Posted 5 years ago by Johan Janssens Staff

Hi Remo, to be able to upload large files server changes are required. The only way to do this is by changing the PHP setting as explained in following tutorial : 3369-does-docman-have-any-filesize-limitations

If you cannot edit your PHP.ini directly, ask your hosting company for help. They will be able to tell you if and how you can change the required PHP settings. If they cannot be changed you will need to consider changing to a different host to resolve this.

There are 4 more comments in this ticket.
Subscribe or login to join the discussion!

Remo Trovato
14.02.15
Answered

System Information

2.0
n/a
n/a
n/a