downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

복수 파일 전송하기> <에러 메세지 설명
Last updated: Fri, 24 Jul 2009

view this page in

일반적인 문제

MAX_FILE_SIZE는 ini 설정 upload_max_filesize보다 큰 파일 크기를 지정할 수 없습니다. 기본값은 2 메가바이트입니다.

메모리 제한을 활성화하면, 큰 값의 memory_limit가 필요합니다. memory_limit를 충분히 크게 설정했는지 확인하십시오.

max_execution_time을 너무 작게 설정하면, 스크립트 실행 시간이 이 값을 초과합니다. max_execution_time을 충분히 크게 설정했는지 확인하십시오.

Note: max_execution_time은 스크립트 자신의 실행 시간에만 영향을 미칩니다. system(), sleep() 함수 등의 시스템 호출, 데이터베이스 쿼리, 파일 업로드 과정에 걸리는 시간 등 스크립트 외부 실행에 소모하는 시간은 스크립트 최대 실행 시간을 측정할 때 포함하지 않습니다.

Warning

max_input_time은 스크립트가 입력을 받아들이는 최대 시간을 초 단위로 지정합니다; 이는 파일 업로드를 포함합니다. 커다란 파일이나 여러 개의 파일을 전송하거나, 사용자가 느린 회선을 사용한다면 기본값인 60초를 초과할 수 있습니다.

post_max_size을 너무 작게 설정하면, 큰 파일은 업로드할 수 없습니다. post_max_size을 충분히 크게 설정했는지 확인해보십시오.

파일에 대한 검증을 하지 않으면, 사용자가 다른 디렉토리의 중요한 정보에 접근할 수 있습니다.

CERN httpd는 클라이언트에서 보내지는 content-type 마임 헤더 첫번째 공백을 제거합니다. 이 문제로 인해서, CERN httpd는 파일 업로드 기능을 지원하지 않습니다.

많은 양의 디렉토리 목록 형식으로 인해, 확장 형식의 이름(공백을 포함하는 등의)을 가지는 파일을 정상적으로 다룰 수 있는 보장은 없습니다.

하나의 폼 변수에 (입력 이름으로 foo[] 등을 사용하여) 보통의 입력 필드와 파일 업로드 필드를 섞어서는 안됩니다.



복수 파일 전송하기> <에러 메세지 설명
Last updated: Fri, 24 Jul 2009
 
add a note add a note User Contributed Notes
일반적인 문제
anders jenbo pc dk
02-Oct-2007 07:22
A responce to admin at creationfarm dot com, Mac OS X and Windows running on a NTFS disk also uses a multi stream file system. Still only the data stream in transfared on http upload. It is preferable to pack Mac OS X files in .dmg files rathere then zip but the avarage user will find zip much easir and they are supported on more platforms.
oliver dot schmidt at drehsinn dot de
10-Dec-2006 03:02
If you want to use open_basedir for securing your server (which is highly recommended!!!) remember to add your tmp dir to the open_basedir value in php.ini.

Example: open_basedir = <your htdocs root, etc...>:/tmp

(Tested on gentoo Linux, Apache 2.2, PHP 5.1.6)
rbemrose at gmail dot com
20-Dec-2005 06:07
tjaart:
The HTTP/1.1 standard, section 4.2 says this about message headers:
"Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive. The field value MAY be preceded by any amount of LWS, though a single SP is preferred."

This can be interpreted in two ways:
1. You have to have at least one whitespace character between the header name and field value.
or
2. You can have no whitespace before the field value.

Either way, the standard recommends 1 space, and you already know that works...
tjaart at siam-data-services dot com
22-May-2005 05:27
Took me a while to figure this one out...

I think this is actually a header problem, but it only
happens when doing a file upload.

If you attept a header("location:http://...) redirect after
processing a $_POST[''] from a form doing a file upload
(i.e. having enctype="multipart/form-data"), the redirect
doesn't work in IE if you don't have a space between
location: & http, i.e.
header("location:http://...)  vs
header("location: http://...)

===================================
<?php
if ($_POST['submit']=='Upload') {
   
// Process File and the redirect...
   
header("location: http://"..."/somewhere.php");
    exit;
}
?>
<html><head></head><body>
<form enctype="multipart/form-data" action="upload.php" method="POST">
    <input type="hidden" name="MAX_FILE_SIZE" value="20000">
    Your file: <input name="filename" type="file">
    <input name="submit" type="submit" value="Upload">
</form>
</body></html>
===================================

This only happens if all of the following are true:
header("location:http://...) with no space
Form being processed has enctype="multipart/form-data"
Browser=IE

To fix the problem, simply add the space.

Hope this helps someone else.
amalcon _a_t_ eudoramail _d_o_t_ com
11-Aug-2004 06: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 01: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 10:59
For apache, also check the LimitRequestBody directive.
If you're running a Red Hat install, this might be set in /etc/httpd/conf.d/php.conf.
By default, mine was set to 512 KB.
sebastian at drozdz dot ch
28-Apr-2003 07: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 01: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.

Most mac ftp clients (like fetch) allow files to be uploaded in Macbinhex, which will also protect the resource fork when transfering files via ftp. I have not seen this equivilent in any mac browser (but I haven't done too much digging either).

FYI, apple does have an old utility called ResEdit that lets you manipulate the resource fork portion of a file.

복수 파일 전송하기> <에러 메세지 설명
Last updated: Fri, 24 Jul 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites