About filesize limits by php and filemanager

dukesx

New member
i was wondering that why file manager and php have different file size limits ? it is quit peculiar and unclear why such a system is introduced where file manager can upload a 100MB file where as php allows 10mb :( is there anyway to change the limit ?
 

smalpierre

New member
Are you talking about an upload form in PHP? I don't think the interpreter cares one bit about how big a PHP file is.

I'm not sure if custom php.ini is supported here, but if it is - do that, and change these:

; Maximum allowed size for uploaded files.
upload_max_filesize = 100M

; Must be greater than or equal to upload_max_filesize
post_max_size = 100M


Usually you do custom php.ini files with a .htaccess file, and a php.ini file stored above your document root - outside of where the webserver can serve pages from.

Be aware that you might also have to modify the script timeout in apache.conf with files that big. You can do that one of two ways - in php.ini it's max_execution_time - but that will change it for all scripts. You can also call this at the beginning of your upload script to set timeout for only that script:

set_time_limit(1800)

1800 is the number of seconds - that's 30 minutes.
 

Peter

New member
The person who uses the file manager is supposed to be the webmaster or some other trusted person so he should normally be allowed to upload large files. You have to be more careful with regular visitors so it makes sense giving them a lower file limit by default.