I also ran into Apache's timeout limit, I had set mine to 60 for performance, but raised it to 300 for large file uploads.
常见缺陷对 MAX_FILE_SIZE 设置的值,不能大于 ini 设置中 upload_max_filesize 选项设置的值。其默认值为 2M 字节。 如果内存限制设置被激活,可能需要将 memory_limit 设置的更大些,请确认 memory_limit 的设置足够的大。 如果 max_execution_time 设置的值太小,脚本运行的时间可能会超过该设置。因此,也请保证 max_execution_time 足够的大。
如果 post_max_size 设置的值太小,则较大的文件会无法被上传。因此,请保证 post_max_size 的值足够的大。 不对正在操作的文件进行验证可能意味着用户能够访问其它目录下的敏感信息。 请注意 CERN httpd 似乎会丢弃它从客户端获得的 content-type mime 头信息中第一个空格后所有的内容,基于这一点,CERN httpd 不支持文件上传特性。 鉴于文件路径的表示方法有很多种,我们无法确保用使用各种外语的文件名(尤其是包含空格的)能够被正确的处理。 开发人员不应将普通的输入字段和文件上传的字段混用同一个表单变量(例如都用 foo[])。
add a note
User Contributed Notes
alby at thirteen dot net
04-Nov-2006 11:26
I also ran into Apache's timeout limit, I had set mine to 60 for performance, but raised it to 300 for large file uploads.
rbemrose at gmail dot com
20-Dec-2005 05:07
tjaart:
tjaart at siam-data-services dot com
22-May-2005 04:27
Took me a while to figure this one out...
amalcon _a_t_ eudoramail _d_o_t_ com
11-Aug-2004 05:35
Note that, when you want to upload VERY large files (or you want to set the limiters VERY high for test purposes), all of the upload file size limiters are stored in signed 32-bit ints. This means that setting a limit higher than about 2.1 GB will result in PHP seeing a large negative number. I have not found any way around this.
morganaj at coleggwent dot ac dot uk
22-Oct-2003 12:53
Here is another that may make your upload fall over. If you are using Squid or similar proxy server make sure that this is not limiting the size of the HTTP headers. This took me weeks to figure out!
tomcashman at unitekgroup dot com
09-Jun-2003 09:59
For apache, also check the LimitRequestBody directive.
sebastian at drozdz dot ch
28-Apr-2003 06:59
It's important that the variable 'open_basedir' in php.ini isn't set to a directory that doesn't not includes tempupload directory
admin at creationfarm dot com
05-Feb-2003 12:16
The macintosh OS (not sure about OSx) uses a dual forked file system, unlike the rest of the world ;-). Every macintosh file has a data fork and a resource fork. When a dual forked file hits a single forked file system, something has to go, and it is the resource fork. This was recognized as a problem (bad idea to begin with) and apple started recomending that developers avoid sticking vital file info in the resource fork portion of a file, but some files are still very sensitive to this. The main ones to watch out for are macintosh font files and executables, once the resource fork is gone from a mac font or an executable it is useless. To protect the files they should be stuffed or zipped prior to upload to protect the resource fork. | ||||