I have a question - I have a file uploader and each user is allowed to upload max_size:30M. Now I'd like to know from your experiences what I should set up in php.ini.
Here are the options I've already changed, but I'm not sure if that is the best:
upload_max_filesize = 30M
post_max_size = 30M
max_execution_time = 300
max_input_time = 300
memory_limit = 32M
Here I think memory_limit is a bit low. And is there something more I have to include? When I tried to upload more than 30M, Firefox crashed.
Thanks for your answers.
<file>
directive in apache to set a memorylimit override for just that one file with a phpvalue directive directly - keep all scripts locked down to (say) 10 meg, but for your upload script, raise the limit to (say) 40meg - Marc B 2012-04-04 18:40
If you work heavily with files you should split the file and upload it in separate parts, it doesn't choke the server as much and you can check the progress, also you don't need that much memory and excecution time.
For some reason someone said it's not true... Well I don't think Youtube or upload sites like Megaupload (rip) use 2gb of memory and 2 hours of maximum excecution time to upload the file of one user, they split the file, in whatever way they can, if you need to upload 30mb files, and you use standard PHP your webserver will choke until the upload finishes, unless you don't care about that, it's not recommended. The easiest solution is to upload it by parts, you can do it using Flash/Silverlight/JS/HTML5 or whatever way you prefer, client-side, and then joining them server-side.
To be able to do that, you will need to somehow split the file client-side, this is normally done with flash/silverlight/javascript/html - gosukiwi 2012-04-04 18:31